File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
hibernate-core/src/main/java/org/hibernate/service/internal Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 5
5
package org .hibernate .service .internal ;
6
6
7
7
import java .util .ArrayList ;
8
+ import java .util .Iterator ;
8
9
import java .util .List ;
9
10
10
11
import org .hibernate .boot .spi .SessionFactoryOptions ;
@@ -26,6 +27,16 @@ public class SessionFactoryServiceRegistryBuilderImpl implements SessionFactoryS
26
27
27
28
public SessionFactoryServiceRegistryBuilderImpl (ServiceRegistryImplementor parent ) {
28
29
this .parent = parent ;
30
+ if ( parent != null ) {
31
+ for ( Iterator <SessionFactoryServiceInitiator <?>> iterator = initiators .iterator (); iterator .hasNext (); ) {
32
+ final SessionFactoryServiceInitiator <?> initiator = iterator .next ();
33
+ if ( parent .locateServiceBinding ( initiator .getServiceInitiated () ) != null ) {
34
+ // Parent takes precedence over the standard service initiators
35
+ iterator .remove ();
36
+ }
37
+ }
38
+
39
+ }
29
40
}
30
41
31
42
/**
You can’t perform that action at this time.
0 commit comments