]> source.dussan.org Git - archiva.git/commitdiff
fixed formatting
authorMaria Odea B. Ching <oching@apache.org>
Tue, 18 May 2010 08:57:59 +0000 (08:57 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Tue, 18 May 2010 08:57:59 +0000 (08:57 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/archiva-1.3.x@945545 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/startup/ArchivaStartup.java

index 9adf31458b8d72cae5c58fe176bbb4595251b8cb..df07e24bbcf169f7c213b5cf111266d07aaf47b3 100644 (file)
@@ -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();
         }
     }
 }