Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
Description
Currently DeploymentUndeployHandler.undeploy() calls
controller.setMode(ServiceController.Mode.NEVER)
to "undeploy DU". This causes the following issue:
There's TestA that deploys & undeploys example.war
There's TestB that deploys & undeploys example.war too (but with different content).
The problem is TestB will see TestA example.war content
This is because there's still controller (for example.war DU) registered with MSC registry,
and it's started again during the deploy phase. The code that will start it again is
—
final ServiceController<?> controller = serviceRegistry.getService(deploymentUnitServiceName);
if(controller != null) {
controller.setMode(ServiceController.Mode.ACTIVE);
} else {
—
located in DeploymentHandlerUtil.deploy().
The solution to this problem is to call
controller.setMode(ServiceController.Mode.REMOVE) to undeploy DU properly.