Deployment type | Description |
---|---|
TopologyProxy.deploy() | Deploys the publish/subscribe topology to all affected brokers. |
BrokerProxy.deploy() | Deploys the broker configuration. |
ExecutionGroupProxy.deploy() | Deploys a BAR file to an execution group. |
TopicRootProxy.deploy() | Deploys the topic hierarchy to all brokers. |
ConfigManagerProxy.cancelDeployment() | Cancels all outstanding deploys in the domain. |
BrokerProxy.cancelDeployment() | Cancels any outstanding deploy to a specific broker. |
The Configuration Manager Proxy API has more information about each of these methods and you can find an example of the code you might use for each type of deployment in the appropriate topic in the Deploying section.
You can also check the result of a deployment using the Configuration Manager Proxy API.
An example
Here is one example that adds a broker called B2 that is running on queue manager QMB2 to the domain and associates with it an execution group called 'default'. This configuration is then deployed to the broker.
For this example to work successfully, the broker B2 has been created on the machine running queue manager QMB2, and it has not already been deployed to by another Configuration Manager.
import com.ibm.broker.config.proxy.*; public class AddBroker { public static void main(String[] args) { ConfigManagerProxy cmp = null; try { ConfigManagerConnectionParameters cmcp = new MQConfigManagerConnectionParameters( "localhost", 1414, ""); cmp = ConfigManagerProxy.getInstance(cmcp); } catch (ConfigManagerProxyException cmpex) { System.out.println("Error connecting: "+cmpex); } if (cmp !=null) { System.out.println("Connected to Config Manager"); addBroker(cmp, "B2", "QMB2", "default"); cmp.disconnect(); } } private static void addBroker(ConfigManagerProxy cmp, String bName, String bQMgr, String egName) { TopologyProxy topology = null; try { topology = cmp.getTopology(); } catch(ConfigManagerProxyPropertyNotInitializedException ex) { System.err.println("Comms problem! "+ex); } if (topology != null) { try { BrokerProxy b2 = topology.createBroker(bName, bQMgr); ExecutionGroupProxy e = b2.createExecutionGroup(egName); b2.deploy(); } catch (ConfigManagerProxyException ex) { System.err.println("Could not perform an action: "+ex); } } } }
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
af20125_ |