Skip to content

Commit

Permalink
Merge pull request #4147 from jamezp/RESTEASY-3493-6.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jamezp committed Apr 21, 2024
2 parents cac000a + be95490 commit d0923ab
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion resteasy-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<version.commons-codec.commons-codec>1.15</version.commons-codec.commons-codec>
<version.io.netty.netty4>4.1.108.Final</version.io.netty.netty4>
<version.io.vertx>4.4.9</version.io.vertx>
<version.io.undertow>2.3.12.Final</version.io.undertow>
<version.io.undertow>2.3.13.Final</version.io.undertow>
<version.jakarta.activation>2.1.2</version.jakarta.activation>
<version.jakarta.enterprise.cdi-api>4.0.1</version.jakarta.enterprise.cdi-api>
<version.jakarta.inject.jakarta.inject-api>2.0.1</version.jakarta.inject.jakarta.inject-api>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package dev.resteasy.embedded.server;

import org.jboss.logging.Logger;
import org.jboss.logging.annotations.Cause;
import org.jboss.logging.annotations.LogMessage;
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.MessageLogger;
Expand All @@ -35,4 +36,8 @@ interface LogMessages {
@LogMessage(level = Logger.Level.WARN)
@Message(id = 900001, value = "Property %s is of type %s and expected to be of type %s")
void invalidProperty(String propertyName, String foundType, String expectedType);

@LogMessage(level = Logger.Level.ERROR)
@Message(id = 900010, value = "Failed to stop the deployment manager for servlet %s")
void failedToStopDeploymentManager(@Cause Throwable cause, String servletName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ public void start(final Configuration configuration) {
throw new RuntimeException(e);
}
undeployAction = () -> {
try {
manager.stop();
} catch (ServletException e) {
LogMessages.LOGGER.failedToStopDeploymentManager(e, deploymentInfo.getDeploymentName());
}
manager.undeploy();
servletContainer.removeDeployment(deploymentInfo);
};
Expand All @@ -91,14 +96,14 @@ public void stop() {
if (deployment != null) {
deployment.stop();
}
final Undertow server = this.server;
if (server != null) {
server.stop();
}
final Runnable undeployAction = this.undeployAction;
if (undeployAction != null) {
undeployAction.run();
}
final Undertow server = this.server;
if (server != null) {
server.stop();
}
}

@Override
Expand Down

0 comments on commit d0923ab

Please sign in to comment.