Skip to content

Commit

Permalink
Merge pull request wildfly#17200 from rhusar/WFLY-18281
Browse files Browse the repository at this point in the history
WFLY-18281 Upgrade mod_cluster to 2.0.3.Final
  • Loading branch information
bstansberry authored Sep 20, 2023
2 parents 7573ea0 + 22d30d3 commit a2bff8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void start(StartContext context) {
eventHandler.start(this.server);
for (Engine engine : this.server.getEngines()) {
for (org.jboss.modcluster.container.Host host : engine.getHosts()) {
host.getContexts().forEach(c->contexts.add(c));
host.getContexts().forEach(contexts::add);
}
}

Expand Down Expand Up @@ -120,24 +120,29 @@ private Context createContext(String contextPath, Host host) {
private synchronized void onStart(Context context) {
ContainerEventHandler handler = this.configuration.getContainerEventHandler();

handler.add(context);

State state = this.configuration.getSuspendController().getState();

// TODO break into onDeploymentAdd once implemented in Undertow
if(state == State.RUNNING) {
if (state == State.RUNNING) {
// Normal operation - trigger ENABLE-APP
handler.start(context);
} else {
// Suspended mode - trigger STOP-APP without request nor session draining;
// n.b. contexts will be started by UndertowEventHandlerAdapterService#resume()
handler.add(context);
}

this.contexts.add(context);
}

private synchronized void onStop(Context context) {
ContainerEventHandler handler = this.configuration.getContainerEventHandler();

// Trigger STOP-APP with possible session draining
handler.stop(context);

// TODO break into onDeploymentRemove once implemented in Undertow
// Trigger REMOVE-APP
handler.remove(context);

this.contexts.remove(context);
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
<version.org.jboss.ironjacamar>3.0.4.Final</version.org.jboss.ironjacamar>
<version.org.jboss.jboss-transaction-spi>8.0.0.Final</version.org.jboss.jboss-transaction-spi>
<version.org.jboss.metadata>16.0.0.Final</version.org.jboss.metadata>
<version.org.jboss.mod_cluster>2.0.2.Final</version.org.jboss.mod_cluster>
<version.org.jboss.mod_cluster>2.0.3.Final</version.org.jboss.mod_cluster>
<version.org.jboss.narayana>7.0.0.Final</version.org.jboss.narayana>
<version.org.jboss.openjdk-orb>9.0.2.Final</version.org.jboss.openjdk-orb>
<version.org.jboss.resteasy>6.2.5.Final</version.org.jboss.resteasy>
Expand Down

0 comments on commit a2bff8e

Please sign in to comment.