Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.catalina.Lifecycle;
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Server;
import org.apache.catalina.Service;
import org.jboss.modcluster.container.ContainerEventHandler;
Expand Down Expand Up @@ -136,6 +137,12 @@ public void containerEvent(ContainerEvent event) {
((Container) child).addPropertyChangeListener(this);

// n.b. MODCLUSTER-790 do not ContainerEventHandler#add(..) the context here - wait for actual start(..)

// In Tomcat 8.5 the LifecycleListener does not pass an after_start event and thus this is the only event
// obtained during 'autoDeploy', so we need to start the context from here, which is already started:
if (this.start.get() && (child instanceof Context) && (LifecycleState.STARTED == ((Context) child).getState())) {
this.eventHandler.start(new TomcatContext(registry, (Context) child));
}
} else if (container instanceof Engine) {
// Deploying a host
container.addContainerListener(this);
Expand Down