After you have made a deployment, check that the operation has completed successfully.
Follow these steps to check a deployment using the workbench:
If you use the mqsideploy command to deploy, it returns numerical values from the Configuration Manager and all brokers affected by the deployment, to indicate the outcome. If the deployment completes successfully, the command returns 0. For details of other values that you might see returned, see mqsideploy command.
TopologyProxy t = cmp.getTopology(); boolean isDelta = true; long timeToWaitMs = 10000; DeployResult dr = topology.deploy(isDelta, timeToWaitMs); System.out.println("Overall result = "+dr.getCompletionCode()); // Display overall log messages Enumeration logEntries = dr.getLogEntries(); while (logEntries.hasMoreElements()) { LogEntry le = (LogEntry)logEntries.nextElement(); System.out.println("General message: " + le.getDetail()); } // Display broker specific information Enumeration e = dr.getDeployedBrokers(); while (e.hasMoreElements()) { // Discover the broker BrokerProxy b = (BrokerProxy)e.nextElement(); // Completion code for broker System.out.println("Result for broker "+b+" = " + dr.getCompletionCodeForBroker(b)); // Log entries for broker Enumeration e2 = dr.getLotEntriesForBroker(b); while (e2.hasMoreElements()) { LogEntry le = (LogEntry)e2.nextElement(); System.out.println("Log message for broker " + b + le.getDetail())); } }The deploy method blocks other processes until all affected brokers have responded to the deployment request.
When the method returns, the DeployResult object represents the outcome of the deployment at the time when the method returned; the object is not updated by the Configuration Manager Proxy.
If the deployment message could not be sent to the Configuration Manager, a ConfigManagerProxyLoggedException exception is thrown at the time of deployment. If the Configuration Manager receives the deployment message, log messages for the overall deployment are displayed, followed by completion codes specific to each broker affected by the deployment. The completion code is one of the following static instances from the CompletionCodeType class:
Completion code | Description |
---|---|
pending | The deployment is held in a batch and will not be sent until you issue ConfigManagerProxy.sendUpdates(). |
submitted | The deploy message was sent to the Configuration Manager but no response was received before the timeout period expired. |
initiated | The Configuration Manager indicated that deployment has started, but no broker responses were received before the timeout period expired. |
successSoFar | The Configuration Manager indicated that deployment has started and some, but not all, brokers responded successfully before the timeout period expired. No brokers responded negatively. |
success | The Configuration Manager indicated that deployment has started and all relevant brokers responded successfully before the timeout period expired. |
failure | The Configuration Manager indicated that deployment has started and at least one broker responded negatively. You can use getLogEntriesForBroker method of the DeployResult class to get more information about the deployment failure. This method returns an enumeration of available LogEntry objects. |
notRequired | The deployment request submitted to the Configuration Manager was not sent to the broker because the broker's configuration is already up to date. |