* and initializes the {@link de.novanic.eventservice.service.registry.EventRegistry}.
* @param aConfig servlet configuration
* @return initialized {@link de.novanic.eventservice.service.registry.EventRegistry}
*/
private EventRegistry initEventRegistry(ServletConfig aConfig) {
final WebDescriptorConfigurationLoader theWebDescriptorConfigurationLoader = new WebDescriptorConfigurationLoader(aConfig);
final EventServiceConfigurationFactory theEventServiceConfigurationFactory = EventServiceConfigurationFactory.getInstance();
theEventServiceConfigurationFactory.addConfigurationLoader(ConfigLevelFactory.DEFAULT, theWebDescriptorConfigurationLoader);
final EventRegistryFactory theEventRegistryFactory = EventRegistryFactory.getInstance();
EventRegistry theEventRegistry = theEventRegistryFactory.getEventRegistry();
if(theWebDescriptorConfigurationLoader.isAvailable()) {
theEventServiceConfigurationFactory.loadEventServiceConfiguration();
}
return theEventRegistry;
}