HHH-13209 Avoid leaking invalid data in side cache of SessionFactoryServiceRegistryImpl

This commit is contained in:
Sanne Grinovero 2018-08-14 21:40:57 +01:00 committed by Guillaume Smet
parent ed0cec0ddb
commit 5fe874f7cf
1 changed files with 7 additions and 0 deletions

View File

@ -7,6 +7,7 @@
package org.hibernate.service.internal;
import java.util.List;
import java.util.ListIterator;
import org.hibernate.boot.spi.SessionFactoryOptions;
import org.hibernate.engine.config.spi.ConfigurationService;
@ -97,4 +98,10 @@ public class SessionFactoryServiceRegistryImpl
return super.getService( serviceRole );
}
@Override
public synchronized void destroy() {
super.destroy();
this.cachedEventListenerRegistry = null;
}
}