Skip to content

Commit

Permalink
WFLY-8697 WSModelDeploymentProcessor doesn't remove WSAttachmentKeys.…
Browse files Browse the repository at this point in the history
…DEPLOYMENT_KEY on undeploy()
  • Loading branch information
rhusar committed May 6, 2017
1 parent 392f924 commit 938e439
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -36,6 +36,7 @@
*/
public abstract class TCCLDeploymentProcessor implements DeploymentUnitProcessor {

@Override
public final void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
try {
Expand All @@ -46,6 +47,7 @@ public final void deploy(DeploymentPhaseContext phaseContext) throws DeploymentU
}
}

@Override
public final void undeploy(final DeploymentUnit context) {
ClassLoader origClassLoader = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged();
try {
Expand Down
Expand Up @@ -50,11 +50,14 @@ public void internalDeploy(final DeploymentPhaseContext phaseContext) throws Dep
}

@Override
public void internalUndeploy(final org.jboss.as.server.deployment.DeploymentUnit context) {
public void internalUndeploy(final DeploymentUnit context) {
if (isWebServiceDeployment(context)) {
ServerConfigImpl config = (ServerConfigImpl)context.getServiceRegistry().getRequiredService(WSServices.CONFIG_SERVICE).getValue();
config.decrementWSDeploymentCount();
}

// Cleans up reference established by AbstractDeploymentModelBuilder#propagateAttachments
context.removeAttachment(WSAttachmentKeys.DEPLOYMENT_KEY);
}

private static boolean isWebServiceDeployment(final DeploymentUnit unit) {
Expand Down

0 comments on commit 938e439

Please sign in to comment.