Deploying a broker archive file

After you have created and populated a broker archive (BAR) file, deployment of the file is required to an execution group on a broker, so that the file can take effect in the broker domain.

Before you start:

You must have created a BAR file. See Creating a broker archive.

The sections in this topic show you how to deploy a broker archive in three different ways: If you make changes to a BAR file, and want to propagate those changes to one or more brokers, you can redeploy the updated BAR file using any of the three ways described above:

If the execution group to which you want to deploy is restricted by an ACL, you must have appropriate access rights to complete this task.

Using the Message Brokers Toolkit

Follow these steps for deployment of a BAR file using the workbench:

  1. Switch to the Broker Administration perspective.
  2. Optional. Typically, an incremental BAR file deployment is performed. 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.

    Do not Remove Deployed Children if you want only to refresh one or more of the child processes with the contents of the BAR file. For an explanation of the difference between a complete and an incremental BAR file deployment, see Message flow application deployment.

  3. Click the BAR file, shown in the Navigator view, to highlight it.
  4. Deploy the BAR file to an execution group.
    • Either drag the file onto your target execution group, shown in the Domains view.
    • Alternatively, right-click the BAR file and click Deploy file. A window shows all of the domains, and execution groups in those domains to which the workbench is connected. A window 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. (If you select a broker topology that is not connected to a domain, an attempt is made to connect the broker topology. If you click Cancel, the broker topology remains unconnected to a domain.)

    Whichever method you use, you can select (and deploy to) only 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 the file 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, which deploys the file contents (message flows and message sets, for example) 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; see Checking the results of deployment.

Using the mqsideploy command

Follow these steps for deployment of a BAR file using the mqsideploy command.

  1. Open a command window that is configured for your environment.
  2. Using the following examples, enter the appropriate command:
    On distributed platforms:
    mqsideploy -i ipAddress -p port -q qmgr -b broker -e exngp -a barfile

    The command 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 computer.

    You must also specify the -b (broker name), -e (execution group name), and -a (BAR file name) parameters.

    On z/OS®:
    /f MQ01CMGR,dp b=broker e=exngp a=barfile

    The command performs an incremental deployment. Add the m=yes parameter to perform a complete BAR file deployment.

    In the example, MQ01CMGR is the name of the Configuration Manager component. You must also specify the names of the broker, execution group, and BAR file (the b=, e=, and a= parameters).

Next:

Continue by checking the results of the deployment; see Checking the results of deployment.

Using the Configuration Manager Proxy

Use the deploy method of the ExecutionGroupProxy class. By default, the deploy method performs an incremental (delta) deployment. To deploy the complete hierarchy, use a variant of the method that includes the Boolean isIncremental parameter set to false. Setting this parameter to true indicates an incremental deployment.

To perform an incremental deployment, for example:
import com.ibm.broker.config.proxy.*;
import java.io.IOException;

public class DeployBar {
  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();
    }
  }
} 
By default, the deploy method performs an incremental deployment. To perform a complete deployment, use a variant of the method that includes a false value for the Boolean isIncremental parameter. For example, e.deploy("deploy.bar",false,0). Setting this parameter to true indicates an incremental deployment.

Next:

Continue by checking the results of the deployment; see Checking the results of deployment.

Redeploying a broker archive file

If you make changes to a BAR file, and want to propagate those changes to one or more brokers, you can redeploy the updated BAR file to one or more execution groups, using any of the deploy methods described previously. You need not stop the message flows that you deployed previously; all resources in the execution group or groups that are in the redeployed BAR file are replaced and new resources are applied.

If your updates to the BAR file include the deletion of resources, a redeployment does not result in their deletion from the broker. For example, assume your BAR file contains message flows F1, F2, and F3. You update the file by removing F2 and adding message flow F4. If you redeploy the BAR file, all four flows are available in the execution group when the redeployment has completed. F1 and F3 are replaced by the contents of the redeployed BAR file.

If you want to clear previously-deployed resources from the execution group before you redeploy, perhaps because you are deleting resources, use one of the methods described above:
  • Using the workbench, follow the instructions for a complete deployment, making sure that you select Remove Deployed Children before deploying.
  • Using the mqsideploy command, follow the instructions, making sure that you add the –m parameter to perform a complete BAR file deployment.
  • Using the Configuration Manager Proxy, follow the instructions for a complete deployment.

If your message flows are not transactional, stop the message flows before you redeploy to be sure that all the applications complete cleanly and are in a known and consistent state. You can stop individual message flows, execution groups, or brokers.

If your message flows are transactional, the processing logic that handles commitment or rollback ensures that resource integrity and consistency are maintained.

Next:

Continue by checking the results of the redeployment. See Checking the results of deployment.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2009Copyright IBM Corporation 1999, 2009.
Last updated : 2009-01-07 15:21:51

af03890_