From dca8072e7d175ea787e27c5ed11e9c461c85d986 Mon Sep 17 00:00:00 2001 From: "Maria Odea B. Ching" Date: Tue, 18 May 2010 08:57:59 +0000 Subject: [PATCH] fixed formatting git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@945545 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/web/startup/ArchivaStartup.java | 36 +++++++++++-------- 1 file changed, 21 insertions(+), 15 deletions(-) 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(); } } } -- 2.39.5