Deploy BAR files to the brokers in your broker network from a CMP application.
You can also check the result of a deployment by using the CMP.
An example
This example connects to a broker that is running on the local computer. Its queue manager, IB9QMGR, is listening on port 2414. The code deploys a BAR file called MyBAR.bar to an integration server called default that is running on the broker, and displays the result.
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();
}
}
}