HHH-8930 corrected overzealous commit

This commit is contained in:
Brett Meyer 2014-02-10 13:56:11 -05:00
parent 9fa9c734da
commit bfd63f1fec
1 changed files with 1 additions and 10 deletions

View File

@ -379,7 +379,6 @@ public abstract class BaseCoreFunctionalTestCase extends BaseUnitTestCase {
}
sessionFactory.close();
sessionFactory = null;
configuration = null;
if(serviceRegistry == null){
return;
}
@ -392,20 +391,12 @@ public abstract class BaseCoreFunctionalTestCase extends BaseUnitTestCase {
@SuppressWarnings( {"UnusedDeclaration"})
public void onFailure() {
if ( rebuildSessionFactoryOnError() ) {
releaseSessionFactory();
rebuildSessionFactory();
}
}
protected void rebuildSessionFactory() {
if ( sessionFactory == null ) {
return;
}
sessionFactory.close();
sessionFactory = null;
configuration = null;
serviceRegistry.destroy();
serviceRegistry = null;
serviceRegistry = buildServiceRegistry( configuration );
if ( isMetadataUsed ) {
// need to rebuild metadata because serviceRegistry was recreated