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.
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.
Follow these steps for deployment of a BAR file using the workbench:
Next:
Continue by checking the results of the deployment; see Checking the results of deployment.
Follow these steps for deployment of a BAR file using the mqsideploy command.
Next:
Continue by checking the results of the deployment; see Checking the results of deployment.
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.
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.
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 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.