diff --git a/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java b/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java index 42f4246fc2..981455a02d 100644 --- a/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java +++ b/documentation/src/test/java/org/hibernate/userguide/caching/SecondLevelCacheTest.java @@ -58,7 +58,7 @@ public class SecondLevelCacheTest extends BaseEntityManagerFunctionalTestCase { options.put( AvailableSettings.CACHE_REGION_FACTORY, EhCacheRegionFactory.class.getName() ); options.put( AvailableSettings.USE_QUERY_CACHE, Boolean.TRUE.toString() ); options.put( AvailableSettings.GENERATE_STATISTICS, Boolean.TRUE.toString() ); - options.put( AvailableSettings.CACHE_REGION_PREFIX, "" ); + //options.put( AvailableSettings.CACHE_REGION_PREFIX, "" ); } @Test diff --git a/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java b/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java index 61b3bc09e1..9576d13e1a 100644 --- a/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/internal/SessionFactoryImpl.java @@ -386,7 +386,7 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor { integrator.disintegrate( this, serviceRegistry ); integratorObserver.integrators.remove( integrator ); } - serviceRegistry.destroy(); + close(); throw e; } }