Fix EntityManagerFactoryClosedTest

This commit is contained in:
Andrea Boriero 2016-04-30 19:56:52 +01:00 committed by Steve Ebersole
parent fd7ada315e
commit d6a3fdb771
1 changed files with 3 additions and 0 deletions

View File

@ -544,6 +544,7 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor {
}
private Session buildEntityManager(SynchronizationType synchronizationType, Map map) {
validateNotClosed();
SessionBuilderImplementor builder = withOptions();
if ( synchronizationType == SynchronizationType.SYNCHRONIZED ) {
builder.autoJoinTransactions( true );
@ -594,6 +595,7 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor {
@Override
public CriteriaBuilder getCriteriaBuilder() {
validateNotClosed();
return criteriaBuilder;
}
@ -739,6 +741,7 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor {
}
public CacheImplementor getCache() {
validateNotClosed();
return cacheAccess;
}