Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-6227

Only way to remove a managedcomponent is to remove its deployment

XMLWordPrintable

      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.

              emuckenhuber_jira Emanuel Muckenhuber (Inactive)
              ccrouch_jira Charles Crouch (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 1 week, 2 days
                  1w 2d
                  Remaining:
                  Remaining Estimate - 1 week, 2 days
                  1w 2d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified