IBM Integration Bus, Version 9.0.0.8 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Deploying a broker archive file

After you have created and populated a broker archive (BAR) file, deploy the file to an integration server on a broker, so that the file contents can be used in the broker.

This topic assumes that you have created a BAR file. For more information, see Creating a broker archive (BAR) file.

If you change a BAR file, and want to propagate those changes to one or more brokers, you can redeploy the updated BAR file by following the instructions in Redeploying a BAR file.

The mode in which your broker is working can affect the number of integration servers and message flows that you can deploy, and the types of node that you can use. See Restrictions that apply in each operation mode.

When you deploy a message flow that contains a subflow that is defined in .subflow file you must deploy the subflow to the same integration server. You cannot deploy the message flow before the subflow, but you can deploy the subflow first, or both resources together. If you redeploy a subflow that is defined in a .subflow file to an integration server, any message flows that use the subflow in that integration server are stopped and restarted. When the message flows restart, they use the updated subflow.

Using the IBM Integration Toolkit

To deploy a BAR file by using the IBM® Integration Toolkit, complete the following steps. You can deploy to only one integration server at a time.

  1. Optional: Typically, an incremental BAR file deployment is performed. To perform a complete BAR file deployment, right-click the target integration server in the Integration Nodes view and click Delete > All Flows and Resources. Wait for the operation to complete before continuing.

    Do not click Delete > All Flows and Resources if you want 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 deployment.

  2. Deploy a BAR file or message flow to an integration server by using one of the following methods. If you want to deploy .msgflow files and .subflow files that are contained in an application or library you must deploy the containing application or library.
    • Drag an application, library, .msgflow file, .subflow file, or BAR file onto your target integration server in the Integration Nodes view.
    • Right-click the application, library, .msgflow file, .subflow file, or BAR file, then click Deploy. The Deploy dialog box opens, listing the integration servers to which the IBM Integration Toolkit is connected.

      Select an integration server, then click OK.

    • Right-click the integration server, and click Deploy. The Resources dialog box opens. You can choose to deploy resources from the workspace, or BAR files from the file system.
      • Specify the type of resource to deploy by selecting the appropriate radio button. The available resources for that category are listed.
      • Select the resource that you want to deploy.
      • Click OK.
  3. If you have not saved the BAR file since you last edited it, 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 broker, which deploys the file contents (for example, message flows and message sets) to the integration server. In the Integration Nodes view, the deployed resources are added to the appropriate integration server.

Using the IBM Integration Explorer

Import a BAR file into the IBM Integration Explorer by following the instructions in Importing a broker archive file to the IBM Integration Explorer.

To deploy a BAR file by using the IBM Integration Explorer, complete the following steps.

  1. Expand the Broker Resources folder and select the folder that contains your BAR files.
  2. Optional: Typically, an incremental BAR file deployment is performed. To perform a complete BAR file deployment, right-click the target integration server in the Integration Nodes view and click Delete > All Flows and Resources. Wait for the operation to complete before continuing.

    Do not Delete > All Flows and Resources if you want 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 deployment.

  3. Deploy the BAR file to an integration server by using one of the following methods:
    • Drag the file onto your target integration server in the Navigator view. You can drag a BAR file from either your IBM Integration Explorer workspace, or from your file system.
    • Right-click the BAR file and click Deploy file. A dialog box opens, listing the integration servers to which the IBM Integration Explorer is connected.

      Select an integration server, then click OK.

    If you use the Deploy file method, you can select (and deploy to) multiple integration servers at a time.

  4. If you have not saved the BAR file since you last edited it, 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 broker, which deploys the file contents (for example, message flows and message sets) to the integration server. Expand the broker in the Navigator view to see the assigned message flows and message sets added to the appropriate integration server.

Using the mqsideploy command

To deploy a BAR file by using the mqsideploy command, complete the following steps.

  1. Open a command window that is configured for your environment.
  2. Enter the appropriate command for your operating system and configuration, by using the following examples as a guide.
    On distributed systems:
    mqsideploy -i ipAddress -p port -q qmgr -e egroup -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 for the queue manager that is associated with the broker. If you have created the broker on the computer on which you run this command, you can specify the broker name instead.

    You must also specify the -e (integration server name), and -a (BAR file name) parameters.

    On z/OS®:
    /f MQ01BRK,dp e=egroup a=barfile

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

    In the example, MQ01BRK is the name of the broker. You must also specify the names of the integration server and the BAR file (the e= and a= parameters).

The command reports when responses are received from the broker. If the command completes successfully, it returns 0 (zero).

Using the CMP

To deploy by using the CMP, use the deploy method of the ExecutionGroupProxy class.

The following code shows how an application can perform an incremental deployment:
import com.ibm.broker.config.proxy.*;
public class DeployBAR {

  public static void main(String[] args) {
    BrokerConnectionParameters bcp =
       new MQBrokerConnectionParameters("localhost", 2414, "IB9QMGR");
    try {
      BrokerProxy b = BrokerProxy.getInstance(bcp);
      ExecutionGroupProxy eg = b.getExecutionGroupByName("default");
      DeployResult dr = eg.deploy("MyBAR.bar", true, 30000);
      System.out.println("Result = "+dr.getCompletionCode());
    } catch (Exception e) {
      e.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). Set this parameter to true to request an incremental deployment.

Redeploying a BAR file

You might change a BAR file and want to propagate those changes to one or more brokers. If so, you can redeploy the updated BAR file to one or more integration servers by using one of the deployment methods described previously. You do not have to stop the message flows that you deployed previously; all resources in the integration server 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 that your BAR file contains applications A1, A2, and A3. Update the file by removing A2 and adding application A4. If you redeploy the BAR file, all four applications are available in the integration server when the redeployment has completed. A1 and A3 are replaced by the contents of the redeployed BAR file.

To clear previously deployed resources from the integration server before you redeploy (for example, if you are deleting resources), use one of the methods described previously.
  • To use the IBM Integration Toolkit, follow the instructions for a complete deployment, making sure that you select Delete > All Flows and Resources before deploying.
  • To use the IBM Integration Explorer, follow the instructions for a complete deployment, making sure that you select Delete All Flows and Resources before deploying.
  • To use the mqsideploy command, follow the instructions, making sure that you add the –m parameter to perform a complete BAR file deployment.
  • To use the CMP, 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, integration servers, or brokers.

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

Check the results of the redeployment by following the instructions in Checking the results of deployment.


af03890_.htm | Last updated Friday, 21 July 2017