-
Bug
-
Resolution: Done
-
Blocker
-
None
-
None
Right now I'm using the following to remove a component:
ManagementView mgtView = ProfileServiceFactory.getCurrentProfileView();
ManagedComponent managedComponent = getManagedComponent();
ManagedDeployment deployment = managedComponent.getDeployment();
mgtView.removeDeployment(deployment.getName(), ManagedDeployment.DeploymentPhase.APPLICATION);
mgtView.process();
But if you have other things defined in the deployment, e.g. the hsqldb-ds.xml deployment contains jboss:service=Hypersonic,database=localDB service as well as the datasource, you end up blowing the whole lot away.
There is an api on the deployment which looks like it would help, but replacing:
mgtView.removeDeployment(deployment.getName(), ManagedDeployment.DeploymentPhase.APPLICATION);
with
deployment.removeComponent(managedComponent.getName());
appears to remove nothing.