SOA / Web Services / Java

A Technology Blog

Archive for September, 2011

Execution Group properties of a local/remote WMB

Posted by Vivek on September 10, 2011

Those using IBM WMB sometimes face issues when they have to connect to a remote broker and deploy their code to an execution group.  The utility (mqsireportproperties) provided by IBM Websphere Message Broker does not allow to read the properties of a remote broker and it is sometimes not possible to log on to a remote broker machine to execute the mqsireportproperties command. Common problems faced by users in such situation are –

1. User requires MB toolkit/ MQ Explorer 7 to connect to broker and see EG details. It is difficult for a user who does not have these tools on his/her machine.

2. User cannot see/ set the properties like debug port, HTTP port on an execution group.

Most user do not know that they can leverage the ConfiguarionManagerProxy APIs as a workaround mainly because WMB users are not generally java savvy. Here is a utility (Simple Java Program) which will help to set and report the properties on a local or remote broker. It is easy to alter and run from command line.


1. Java 6

2. Following jars are added in  classpath – ConfigManagerProxy.jar (located at ../MQSI/7.0/classes), (located at ../Websphere MQ/Java/lib) and (located at …/Websphere MQ/Java/lib)

import java.util.Enumeration;









 * This utility connect to a broker and reports the properties on an execution

 * group.


 * @author vivek



public class EGStatusReport {

      public static void main(String args[]) {

            try {

                  BrokerConnectionParameters bcp = new MQBrokerConnectionParameters(

                              “localhost”, 1425, “MYQMGR”);

                  BrokerProxy b = BrokerProxy.getInstance(bcp);

                  Enumeration<ExecutionGroupProxy> listEG = b


                  while (listEG.hasMoreElements()) {

                        ExecutionGroupProxy egIter = listEG.nextElement();

                        // Get Execution Group Name


                                    .println(“Execution Group Name – ” + egIter.getName());


                        System.out.println(“Debug Port of EG – ”

                                    + egIter.getDebugPort());


                        System.out.println(“HTTP port enabled on EG – ”

                                    + egIter.getRuntimeProperty(“HTTPConnector/port”));

                        // Get List of Message Flows and their details

                        Enumeration<MessageFlowProxy> listMsgFlow = egIter


while (listMsgFlow.hasMoreElements()) {

                              MessageFlowProxy msgFlow = listMsgFlow.nextElement();

                              // Get name of message flow

                              System.out.println(“Messsage Flow Name – ”

                                          + msgFlow.getName());

                              // Get BAR File Name

                              System.out.println(“BAR File Name – ”

                                          + msgFlow.getBARFileName());

                              // Get time of deployment

                              System.out.println(“Deployed at – ”

                                          + msgFlow.getDeployTime());

                              // Get run status of Message Flow

                              System.out.println(“Is run enabled? – ”

                                          + msgFlow.isRunEnabled());


                        // Get number of deployed objects

                        System.out.println(“No of deployed objects – ”

                                    + egIter.getDeployedObjectsCount(null));


            } catch (ConfigManagerProxyLoggedException e) {


            } catch (ConfigManagerProxyPropertyNotInitializedException e) {





Refer to the following URL for complete list of methods:


Posted in IBM Websphere Message Broker, integration, Java/J2EE | 1 Comment »