mirror of https://github.com/apache/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
This commit is contained in:
parent
4031cb1f9b
commit
dca8072e7d
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue