See information about the latest product version
Viewing and managing a broker in the CMP API Exerciser
Use the CMP API Exerciser sample to view and manage a broker.
- Start the CMP API Exerciser:
On Windows, click Start > All Programs > IBM WebSphere Message Broker 8.0.0.0 > Java Programming APIs > CMP API Exerciser.
On other platforms:
- Start a broker command environment by running mqsiprofile, or follow the guidance provided in the StartConfigManagerProxyExerciser shell script to configure the correct CLASSPATH for your environment.
- Ensure that your user ID has writer permission to the current directory. The CMP API Exerciser stores its configuration settings in a file in this directory.
- Run the shell script:
install_dir\sample\ConfigManagerProxy\StartConfigManagerProxyExerciser
- Connect to a running broker by clicking either File > Connect to Local Broker or File > Connect
to Remote Broker.
The Connect to a Broker dialog opens.
- Enter the connection parameters to the broker, then click Submit.
Broker information is retrieved and displayed in the CMP API Exerciser window. You have now connected to the broker.
The upper left of the screen contains a hierarchical representation of the broker to which you are connected. Selecting objects in the tree causes the table on the right to change, reflecting the attributes of the object that you select. The Method column lists CMP API methods that you can call in your own Java™ applications, and the Result column indicates the data that is returned by calling the CMP API method on the selected object.
- Run a CMP API method against a broker object. CMP API methods are used
to manage objects in a broker.
- In the navigation tree, right-click a broker.
A pop-up menu opens to show all the available CMP API methods.
- Select Create execution group. The Create execution group dialog opens.
- Enter the name for a new execution group and click Submit. The output from the method is displayed in the log window
at the bottom of the screen. For example:
(31/03/09 16:53:50) ----> cmp.exerciser.ClassTesterForBrokerProxy.testCreateEG (MB8BROKER, "eg1") (31/03/09 16:53:50) The request was successfully sent to the broker. (31/03/09 16:53:50) <---- cmp.exerciser.ClassTesterForBrokerProxy.testCreateEG
You also see messages that are returned from the broker when the method is called. For example:(31/03/09 16:53:50) ----> cmp.exerciser.ExerciserAdministeredObjectListener.processActionResponse(...) (31/03/09 16:53:50) affectedObject = MB8BROKER (31/03/09 16:53:50) completionCode = success (31/03/09 16:53:50) (Reference property) commsmessage.lastinbatch=true (31/03/09 16:53:50) (Reference property) uuid=595e1d10-3875-11d4-a485-000629be5bf8 (31/03/09 16:53:50) (Reference property) child.uuid=1d8b3c5d-2001-0000-0080-c2000502e620 (31/03/09 16:53:50) (Reference property) configmanagerproxy.osname=Windows (31/03/09 16:53:50) (Reference property) child.name=eg1 (31/03/09 16:53:50) (Reference property) userid=Matt (31/03/09 16:53:50) (Reference property) configmanagerproxy.hostname=lucas (31/03/09 16:53:50) (Reference property) commsmessage.configobjecttype=Broker (31/03/09 16:53:50) (Reference property) type=Broker (31/03/09 16:53:50) (Reference property) child.type=ExecutionGroup (31/03/09 16:53:50) (Reference property) commsmessage.operationtype=createchild (31/03/09 16:53:50) (Reference property) configmanagerproxy.noeventlog=false (31/03/09 16:53:50) (Reference property) eg.arch=0 (31/03/09 16:53:50) <---- cmp.exerciser.ExerciserAdministeredObjectListener.processActionResponse()
In this example, completionCode = success means that the request to create the execution group is successful. The lines marked (Reference property) describe the request to which the response refers.
- In the navigation tree, right-click a broker.