mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
HHH-8502 synchronize AuditConfiguration#destroy
This commit is contained in:
parent
3be247023b
commit
c31d9d3213
@ -185,10 +185,12 @@ public synchronized static AuditConfiguration getFor(Configuration cfg, ClassLoa
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
for ( Map.Entry<Configuration, AuditConfiguration> c : new HashSet<Map.Entry<Configuration, AuditConfiguration>>(
|
||||
cfgs.entrySet() ) ) {
|
||||
if ( c.getValue() == this ) { // this is nasty cleanup fix, whole static CFGS should be reworked
|
||||
cfgs.remove( c.getKey() );
|
||||
synchronized ( AuditConfiguration.class ) {
|
||||
for ( Map.Entry<Configuration, AuditConfiguration> c : new HashSet<Map.Entry<Configuration, AuditConfiguration>>(
|
||||
cfgs.entrySet() ) ) {
|
||||
if ( c.getValue() == this ) { // this is nasty cleanup fix, whole static CFGS should be reworked
|
||||
cfgs.remove( c.getKey() );
|
||||
}
|
||||
}
|
||||
}
|
||||
classLoaderService = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user