Skip to content

Commit

Permalink
WFLY-8697 ModuleContextProcessor doesn't cleanup its Attachments on u…
Browse files Browse the repository at this point in the history
…ndeploy()
  • Loading branch information
rhusar committed May 6, 2017
1 parent a76c5f0 commit bb0a90c
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -79,7 +79,7 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
.addInjection(moduleNameBinder.getManagedObjectInjector(), new ValueManagedReferenceFactory(Values.immediateValue(moduleDescription.getModuleName())))
.addDependency(moduleContextServiceName, ServiceBasedNamingStore.class, moduleNameBinder.getNamingStoreInjector())
.install();
deploymentUnit.addToAttachmentList(org.jboss.as.server.deployment.Attachments.JNDI_DEPENDENCIES,moduleNameServiceName);
deploymentUnit.addToAttachmentList(org.jboss.as.server.deployment.Attachments.JNDI_DEPENDENCIES, moduleNameServiceName);

deploymentUnit.putAttachment(MODULE_CONTEXT_CONFIG, moduleContextServiceName);

Expand All @@ -106,7 +106,10 @@ public void deploy(DeploymentPhaseContext phaseContext) throws DeploymentUnitPro
deploymentUnit.putAttachment(Attachments.JAVA_NAMESPACE_SETUP_ACTION, setupAction);
}

public void undeploy(DeploymentUnit context) {

public void undeploy(DeploymentUnit deploymentUnit) {
deploymentUnit.removeAttachment(Attachments.JAVA_NAMESPACE_SETUP_ACTION);
deploymentUnit.getAttachmentList(org.jboss.as.ee.component.Attachments.WEB_SETUP_ACTIONS).removeIf(setupAction -> setupAction instanceof JavaNamespaceSetup);
deploymentUnit.getAttachmentList(SETUP_ACTIONS).removeIf(setupAction -> setupAction instanceof JavaNamespaceSetup);
deploymentUnit.removeAttachment(MODULE_CONTEXT_CONFIG);
}
}

0 comments on commit bb0a90c

Please sign in to comment.