Skip to content
Browse files

fix for JBPAPP-9788.

  • Loading branch information...
1 parent 36b8983 commit 088f844eb6979e877b050ca43f1e33053c208daa @jfclere jfclere committed Sep 20, 2012
View
5 ...omcat6/src/main/java/org/jboss/modcluster/container/tomcat/TomcatEventHandlerAdapter.java
@@ -24,6 +24,7 @@
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
+import org.apache.catalina.Server;
import org.jboss.modcluster.container.ContainerEventHandler;
import org.jboss.modcluster.container.catalina.CatalinaEventHandlerAdapter;
import org.jboss.modcluster.container.catalina.CatalinaFactory;
@@ -46,6 +47,10 @@ protected boolean isAfterInit(LifecycleEvent event) {
@Override
protected boolean isBeforeDestroy(LifecycleEvent event) {
+ /* Tomcat 6 is not send a before_destroy nor after_destroy for server so we use after_stop instead */
+ Lifecycle source = event.getLifecycle();
+ if ((source instanceof Server) && event.getType().equals(Lifecycle.AFTER_STOP_EVENT))
+ return true;
return event.getType().equals(Lifecycle.DESTROY_EVENT);
}
}

0 comments on commit 088f844

Please sign in to comment.
Something went wrong with that request. Please try again.