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 from JavaCompute nodes

You can use the CMP API to manage brokers and their associated resources from JavaCompute nodes in deployed message flows.

Before you start

Before starting this step, you must create a JavaCompute node in a message flow.

Use CMP methods and classes in your JavaCompute node to explore and manage brokers and other resources.

  1. Create the Java class for the node in which you want to include CMP methods.
  2. Add the CMP JAR file install_dir/classes/ConfigManagerProxy.jar to the Java build path for the associated Java project.
  3. Add the following static method to the class:
    BrokerProxy thisBroker = BrokerProxy.getLocalInstance();

    This method returns an instance of the BrokerProxy object for the broker to which the message flow (that contains this node) is deployed.

  4. To work with an execution group on this broker, add the following static method to your code:
    ExecutionGroupProxy thisEG = ExecutionGroupProxy.getLocalInstance();
    This method returns an instance of the ExecutionGroupProxy object for the execution group to which the message flow is deployed.
  5. If you want to connect to a different broker that you have created on the computer to which your node and message flow are deployed, you can use a variant of this class:
    BrokerProxy secondBroker = BrokerProxy.getLocalInstance(string)

    Specify the name of the alternative local broker as the value of the variable string. Your code can manage this second broker, and its associated resources, by using the BrokerProxy object that is returned by this call.

  6. Include additional CMP methods in your Java code to run the operations that you want against the broker or execution group by using the objects obtained in previous steps. You can follow the guidance that is provided in other topics in this section for further information and examples that show how to use CMP methods in CMP applications.

    If you include methods that affect the message flow in which your CMP application is running, it might not be able to receive all notifications that these operations have successfully completed. Stopping, deleting, and redeploying the message flow are examples in this category; consider carefully the consequences of using these methods.

  7. Deploy the JAR file, and all associated message flows, in a BAR file. You do not have to deploy the ConfigManagerProxy.jar file to the target execution group, because the broker can access these classes independently.
Notices | Trademarks | Downloads | Library | Support | Feedback

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

        
        Last updated:
        
        Last updated: 2016-05-23 14:48:06


Task topicTask topic | Version 8.0.0.7 | be43050_