Deploying a broker archive file

Before you start:

This task explains how to deploy your broker archive (bar). If you have not already created a bar file, create it now, before continuing.

You need to have access rights if the execution group to which you want to deploy is restricted by an ACL.

Using the Message Brokers Toolkit

Follow these steps to deploy a bar file using the workbench:

  1. Switch to the Broker Administration perspective.
  2. Optional. Normally, an incremental bar file deployment is performed. If you want to perform a complete bar file deployment: right-click the target execution group in the Domains view and select Remove Deployed Children. Wait for the operation to complete before continuing.

    It is not necessary to remove deployed children if you only want to refresh one or more of them with the contents of the bar file. The difference between a complete and an incremental bar file deployment is explained in the Message flow application deployment topic.

  3. Click the bar file shown in the Navigator view to highlight it.
  4. Drag the file onto your target execution group shown in the Domains view.

    Alternatively, right-click the bar file and click Deploy file. A dialog box shows all the domains, as well as execution groups within those domains to which the workbench is connected. A dialog box shows the execution groups (within their domains) to which you can deploy the bar file. Select an execution group and click OK to deploy the bar file. (Note: If you select a broker topology that is not connected to a domain, an attempt is made to connect it. If you click Cancel, the broker topology remains unconnected to a domain.)

    Whichever method you use, you cannot select (and deploy to) more than one execution group at a time.

  5. If the bar file has not been saved since it was last edited, you are asked whether you want to save it before deploying. If you click Cancel, the bar file is not saved and deployment does not take place.
The bar file is transferred to the Configuration Manager from where its contents (message flows and message sets, for example) are deployed to the execution group. In the Domains view, the assigned message flows and message sets are added to the appropriate execution group.

Next:

Continue by checking the results of the deployment.

Using the mqsideploy command

Follow these steps to deploy a bar file 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 b=broker e=exngp a=barfile

    This performs an incremental deployment. Add the m=yes parameter to perform a complete bar file deployment.

    On other platforms:
    mqsideploy -i ipAddress -p port -q qmgr -b broker -e exngp -a barfile

    This performs an incremental deployment. Add the –m parameter to perform a complete bar file deployment.

    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 -b (broker name), -e (execution group name), and -a (bar file name) parameters (or z/OS equivalent) must also be specified.

Next:

Continue by checking the results of the deployment.

Using the Configuration Manager Proxy API

Use the deploy method of the ExecutionGroupProxy class. By default, the deploy method performs an incremental deployment. To perform a complete deployment, use a variant of the method that includes the boolean isIncremental parameter; setting this to false indicates a complete deployment. (Setting it to true indicates an incremental deployment.)

For example:
import com.ibm.broker.config.proxy.*;
import java.io.IOException;

public class DeployTopology {
  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.deploy("deploy.bar");
    }
    catch (ConfigManagerProxyException cmpe) {
      cmpe.printStackTrace();
    }
    catch (IOException ioe) {
      ioe.printStackTrace();
    }
  }
} 

Next:

Continue by checking the results of the deployment.