Fix EntityManagerFactoryClosedTest
This commit is contained in:
parent
fd7ada315e
commit
d6a3fdb771
|
@ -544,6 +544,7 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Session buildEntityManager(SynchronizationType synchronizationType, Map map) {
|
private Session buildEntityManager(SynchronizationType synchronizationType, Map map) {
|
||||||
|
validateNotClosed();
|
||||||
SessionBuilderImplementor builder = withOptions();
|
SessionBuilderImplementor builder = withOptions();
|
||||||
if ( synchronizationType == SynchronizationType.SYNCHRONIZED ) {
|
if ( synchronizationType == SynchronizationType.SYNCHRONIZED ) {
|
||||||
builder.autoJoinTransactions( true );
|
builder.autoJoinTransactions( true );
|
||||||
|
@ -594,6 +595,7 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CriteriaBuilder getCriteriaBuilder() {
|
public CriteriaBuilder getCriteriaBuilder() {
|
||||||
|
validateNotClosed();
|
||||||
return criteriaBuilder;
|
return criteriaBuilder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,6 +741,7 @@ public final class SessionFactoryImpl implements SessionFactoryImplementor {
|
||||||
}
|
}
|
||||||
|
|
||||||
public CacheImplementor getCache() {
|
public CacheImplementor getCache() {
|
||||||
|
validateNotClosed();
|
||||||
return cacheAccess;
|
return cacheAccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue