Author: pete.muir(a)jboss.org
Date: 2009-03-27 16:25:09 -0400 (Fri, 27 Mar 2009)
New Revision: 2241
Modified:
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java
Log:
better shutdown
Modified:
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java
===================================================================
---
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java 2009-03-27
20:21:52 UTC (rev 2240)
+++
extensions/trunk/tomcat/int/src/main/java/org/jboss/webbeans/environment/tomcat/Listener.java 2009-03-27
20:25:09 UTC (rev 2241)
@@ -26,6 +26,7 @@
import org.jboss.webbeans.environment.tomcat.discovery.TomcatWebBeanDiscovery;
import org.jboss.webbeans.environment.tomcat.resources.ReadOnlyNamingContext;
import org.jboss.webbeans.environment.tomcat.util.Reflections;
+import org.jboss.webbeans.manager.api.WebBeansManager;
import org.jboss.webbeans.resources.spi.NamingContext;
import org.jboss.webbeans.servlet.api.ServletListener;
import org.jboss.webbeans.servlet.api.helpers.ForwardingServletListener;
@@ -42,6 +43,7 @@
private final transient Bootstrap bootstrap;
private final transient ServletListener webBeansListener;
+ private WebBeansManager manager;
public Listener()
{
@@ -65,7 +67,7 @@
public void contextDestroyed(ServletContextEvent sce)
{
- bootstrap.shutdown();
+ manager.shutdown();
super.contextDestroyed(sce);
}
@@ -78,6 +80,7 @@
bootstrap.getServices().add(NamingContext.class, new ReadOnlyNamingContext() {});
bootstrap.setApplicationContext(applicationBeanStore);
bootstrap.initialize();
+ manager = bootstrap.getManager();
bootstrap.boot();
super.contextInitialized(sce);
}
Show replies by date