The WebSphere MQ classes for Java interface

 

The procedural WebSphere MQ application programming interface is built around the following verbs:

       MQBACK, MQBEGIN, MQCLOSE, MQCMIT, MQCONN, MQCONNX,
       MQDISC, MQGET, MQINQ, MQOPEN, MQPUT, MQPUT1, MQSET

These verbs all take, as a parameter, a handle to the WebSphere MQ object on which they are to operate. Because Java™ is object-oriented, the Java programming interface turns this round. Your program consists of a set of WebSphere MQ objects, which you act upon by calling methods on those objects.

When you use the procedural interface, you disconnect from a queue manager by using the call MQDISC(Hconn, CompCode, Reason), where Hconn is a handle to the queue manager.

In the Java interface, the queue manager is represented by an object of class MQQueueManager. You disconnect from the queue manager by calling the disconnect() method on that class.

// declare an object of type queue manager
MQQueueManager queueManager=new MQQueueManager();
...
// do something...
...
// disconnect from the queue manager
queueManager.disconnect();


uj10990_