diff --git a/hibernate-core/src/main/java/org/hibernate/service/internal/AbstractServiceRegistryImpl.java b/hibernate-core/src/main/java/org/hibernate/service/internal/AbstractServiceRegistryImpl.java index 96dffd6c1c..530c356cf1 100644 --- a/hibernate-core/src/main/java/org/hibernate/service/internal/AbstractServiceRegistryImpl.java +++ b/hibernate-core/src/main/java/org/hibernate/service/internal/AbstractServiceRegistryImpl.java @@ -205,10 +205,9 @@ public abstract class AbstractServiceRegistryImpl service = serviceBinding.getService(); if ( service == null ) { service = initializeService( serviceBinding ); - // add the service only after it is completely initialized - initializedServiceByRole.put( serviceRole, service ); } - + // add the service only after it is completely initialized + initializedServiceByRole.put( serviceRole, service ); return service; } }