HHH-16911 Ensure we don't leak references to JPA callbacks on SessionFactory close
This commit is contained in:
parent
f3e11f1610
commit
724e376b7c
|
@ -166,7 +166,7 @@ public class SessionFactoryImpl extends QueryParameterBindingTypeResolverImpl im
|
|||
private final transient Map<String,Object> settings;
|
||||
|
||||
private final transient SessionFactoryServiceRegistry serviceRegistry;
|
||||
private final transient EventEngine eventEngine;
|
||||
private final transient EventEngine eventEngine;//Needs to be closed!
|
||||
private final transient JdbcServices jdbcServices;
|
||||
private final transient SqlStringGenerationContext sqlStringGenerationContext;
|
||||
|
||||
|
@ -899,6 +899,9 @@ public class SessionFactoryImpl extends QueryParameterBindingTypeResolverImpl im
|
|||
if ( queryEngine != null ) {
|
||||
queryEngine.close();
|
||||
}
|
||||
if ( eventEngine != null ) {
|
||||
eventEngine.stop();
|
||||
}
|
||||
}
|
||||
finally {
|
||||
status = Status.CLOSED;
|
||||
|
|
Loading…
Reference in New Issue