ServiceRegistryBuilder registryBuilder = new ServiceRegistryBuilder();
registryBuilder.applySettings( hibConfiguration.getProperties() );
final ServiceRegistry serviceRegistry = ServiceRegistryTools.build( registryBuilder );
SessionFactoryImpl sessionFactoryImpl = (SessionFactoryImpl) hibConfiguration.buildSessionFactory(
serviceRegistry
);
ServiceRegistryImplementor serviceRegistryImplementor = sessionFactoryImpl.getServiceRegistry();
EventListenerRegistry registry = serviceRegistryImplementor.getService( EventListenerRegistry.class );
for ( LoadEventListener listener : additionalLoadEventListeners ) {
registry.getEventListenerGroup( EventType.LOAD ).appendListener( listener );
}