Removing a deployed object from an execution group

There are three ways of removing deployed objects from an execution group:

Using the Message Brokers Toolkit

Follow these steps to remove an object from an execution group using the workbench:

  1. Switch to the Broker Administration perspective.
  2. From the Domains view, right-click the object that you want to remove.
  3. Click Remove from the pop-up menu, and OK to confirm.

An automatic deployment is performed for the updated broker and a BIP08921 information message is produced, confirming that the request was received by the Configuration Manager.

Using the mqsideploy command

Follow these steps to remove an object from an execution group using the mqsideploy command:

  1. Open a command window that is configured for your environment.
  2. Using these as examples, enter the appropriate command, typed on a single line:
    On z/OS:
    /f MQ01CMGR,dp t=yes b=broker e=execgp d=file1.cmf:file2.dictionary:file3.xml
    On other platforms:
    mqsideploy -i ipAddress -p port -q qmgr –b broker –e execgp
                          –d file1.cmf:file2.dictionary:file3.xml
    Optionally, specify the -m option to clear the contents of the execution group. This tells the execution group to completely clear any existing data before the new bar file is deployed.
    The -i (IP address), -p (port), and -q (queue manager) parameters represent the connection details of the queue manager workstation, and on the z/OS console, MQ01CMGR is the name of the Configuration Manager component.

The -d argument (or d= argument on z/OS) is a colon separated list of files to be removed from the named execution group. Invoking the command above causes the deployed objects (file1.cmf, file2.dictionary and file3.xml) to be removed from the specified execution group and broker.

The command displays feedback as responses are received from the Configuration Manager and any brokers affected by the deployment. If the command completes successfully, it returns 0.

Using the Configuration Manager Proxy API

One way of removing deployed objects using the Configuration Manager Proxy API is to get a handle to the relevant ExecutionGroupProxy object and then invoke its deleteDeployedObjectsByName() method. For example:
import com.ibm.broker.config.proxy.*;

public class DeleteDeployedObjects {
  public static void main(String[] args) {
    ConfigManagerConnectionParameters cmcp =
            new MQConfigManagerConnectionParameters
                      ("localhost", 1414, "QM1");
    try {
      ConfigManagerProxy cmp =
            ConfigManagerProxy.getInstance(cmcp);
      TopologyProxy t = cmp.getTopology();
      BrokerProxy b = t.getBrokerByName("broker1");
      ExecutionGroupProxy e =
            b.getExecutionGroupByName("default");
      e.deleteDeployedObjectsByName(
            new String[] { "file1.cmf",
                           "file2.dictionary",
                           "file3.xml" }, 0);
    }
    catch (ConfigManagerProxyException e) {
      e.printStackTrace();
    }
  }
}