This topic contains sections marked as revised for this release
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.
You can deploy a broker archive in three ways:
You can also redeploy a broker archive file using these three methods; for further information, see Redeploying a broker archive file.
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 to deploy a bar file using the workbench:
Next:
Continue by checking the results of the deployment.
Follow these steps to deploy a bar file using the mqsideploy command:
Next:
Continue by checking the results of the deployment.
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.
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(); } } }
Next:
Continue by checking the results of the 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 above. You do not have to 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 any new resources are applied.
If your updates to the bar file include the deletion of resources, a redeploy 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, when the redeployment has completed, all four flows are available in the execution group. F1 and F3 are replaced by the content of the redeployed bar file.
If you want to clear resources from the execution group that you previously deployed before you redeploy, perhaps because you are deleting resources, use either the mqsideploy command with the option -m -complete or the appropriate CMP deploy method for the execution group. If you prefer to use the Message Broker Toolkit, select the execution group or groups, click Remove deployed children, and then deploy.
If your message flows are not transactional, you might consider stopping those message flows before you redeploy. Stop the flows if you want 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.