WebSphere Message Broker, Version 8.0.0.7 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS

See information about the latest product version

Managing brokers in a CMP application

Manage the brokers and their resources from a CMP application.

Before you start

Before you start this task, you must have completed the task Connecting to a broker from a CMP application.

Use the CMP API to change the state of objects in the domain; you can create, delete, modify, and deploy objects stored within it. The following example sets the long description field of the broker:

import com.ibm.broker.config.proxy.*;

public class SetLongDescription {

  public static void main(String[] args) {
        
    BrokerProxy b = null;
    try {
      BrokerConnectionParameters bcp =
         new MQBrokerConnectionParameters(
           "localhost",
           1414,
           "");
      b = BrokerProxy.getInstance(bcp);
      b.setLongDescription("this is my broker");
      b.disconnect();
    } catch (ConfigManagerProxyException cmpex) {
      System.out.println("Error connecting: "+cmpex);
    }
  }
}

The broker processes requests to change properties from the CMP asynchronously, therefore if your application calls getLongDescription() immediately following the call to setLongDescription(), the response might return the old value of the property. For more information, see Checking the results of broker management with the most recent completion code in a CMP application.

Next:

Most state-changing CMP methods return control immediately without informing the calling application of the outcome of the request. To discover this information, see Checking the results of broker management in a CMP application.

Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:47:00


Task topicTask topic | Version 8.0.0.7 | ae33050_