SessionFactoryImplementor sessionFactory,
Configuration configuration,
ServiceRegistryImplementor serviceRegistry) {
final EventListenerRegistryImpl registry = new EventListenerRegistryImpl();
final EventListenerRegistrationService registrationService = serviceRegistry.getService(
EventListenerRegistrationService.class
);
for ( EventListenerRegistration registration : registrationService.getEventListenerRegistrations() ) {
registration.apply( registry, configuration, configuration.getProperties(), serviceRegistry );
}
return registry;
}