public void contextInitialized(ServletContextEvent contextEvent) {
WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext(contextEvent.getServletContext());
SecuritySynchronization securitySync = (SecuritySynchronization) wac.getBean(PlexusToSpringUtils.buildSpringId(SecuritySynchronization.class));
ResolverFactoryInit resolverFactory = (ResolverFactoryInit) wac.getBean(PlexusToSpringUtils.buildSpringId(ResolverFactoryInit.class));
ArchivaTaskScheduler taskScheduler = (ArchivaTaskScheduler) wac.getBean(PlexusToSpringUtils.buildSpringId(ArchivaTaskScheduler.class));
wac.getBean(PlexusToSpringUtils.buildSpringId(TaskQueueExecutor.class, "database-update"));
wac.getBean(PlexusToSpringUtils.buildSpringId(TaskQueueExecutor.class, "repository-scanning"));
wac.getBean(PlexusToSpringUtils.buildSpringId(TaskQueueExecutor.class, "indexing"));
try
{
securitySync.startup();
resolverFactory.startup();
taskScheduler.startup();
Banner.display();
}
catch ( ArchivaException e )
{
throw new RuntimeException( "Unable to properly startup archiva: " + e.getMessage(), e );