Skip to content

Commit

Permalink
HHH-16911 Ensure we don't leak references to JPA callbacks on Session…
Browse files Browse the repository at this point in the history
…Factory close
  • Loading branch information
Sanne committed Aug 1, 2023
1 parent f3e11f1 commit 724e376
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -899,6 +899,9 @@ public void close() throws HibernateException {
if ( queryEngine != null ) {
queryEngine.close();
}
if ( eventEngine != null ) {
eventEngine.stop();
}
}
finally {
status = Status.CLOSED;
Expand Down

0 comments on commit 724e376

Please sign in to comment.