[jboss-dev-forums] [Design of POJO Server] - Only way to remove a managedcomponent is to remove its deplo

charles.crouch@jboss.com do-not-reply at jboss.com
Tue Nov 18 13:34:38 EST 2008


I know we've discussed this before but I wanted bring it up again now we have a concrete api to work with. Right now the only way to remove a component appears to be as follows:

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 does not:

deployment.removeComponent(managedComponent.getName());

So in the spirit of API completeness for GA I'd like to discuss what api changes we should look to support removing a single component, rather than entire deployment.

First idea:
-Treat a delete like an update. Don't alter the underlying deployment descriptor, just add a management override that says don't process component foo.

Cheers

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4190228#4190228

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4190228



More information about the jboss-dev-forums mailing list