From: Maria Odea B. Ching Date: Tue, 18 May 2010 08:57:59 +0000 (+0000) Subject: fixed formatting X-Git-Tag: archiva-1.3.1~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dca8072e7d175ea787e27c5ed11e9c461c85d986;p=archiva.git fixed formatting git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@945545 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java index 9adf31458..df07e24bb 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java @@ -32,22 +32,27 @@ import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.support.WebApplicationContextUtils; /** - * ArchivaStartup - the startup of all archiva features in a deterministic order. - * + * ArchivaStartup - the startup of all archiva features in a deterministic order. + * * @version $Id$ */ public class ArchivaStartup implements ServletContextListener { - 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")); + 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 { @@ -62,12 +67,13 @@ public class ArchivaStartup } } - public void contextDestroyed(ServletContextEvent contextEvent) + public void contextDestroyed( ServletContextEvent contextEvent ) { - ApplicationContext applicationContext = WebApplicationContextUtils.getRequiredWebApplicationContext(contextEvent.getServletContext()); - if (applicationContext != null && applicationContext instanceof ClassPathXmlApplicationContext) + ApplicationContext applicationContext = + WebApplicationContextUtils.getRequiredWebApplicationContext( contextEvent.getServletContext() ); + if ( applicationContext != null && applicationContext instanceof ClassPathXmlApplicationContext ) { - ((ClassPathXmlApplicationContext)applicationContext).close(); + ( (ClassPathXmlApplicationContext) applicationContext ).close(); } } }