Writing IBM MQ classes for Java applications

This collection of topics provides information to assist with writing Java applications to interact with IBM MQ systems.

To use IBM MQ classes for Java to access IBM MQ queues, you write Java applications that contain calls that put messages onto, and get messages from, IBM MQ queues. For details of individual classes, see IBM MQ classes for Java.

Note: Automatic client reconnection is not supported by IBM MQ classes for Java.


The IBM MQ classes for Java interface

The procedural IBM MQ application programming interface uses verbs, which act on objects. The Java programming interface uses objects, which you act upon by calling methods.

The procedural IBM MQ application programming interface is built around verbs such as these:
MQBACK, MQBEGIN, MQCLOSE, MQCONN, MQDISC,
MQGET, MQINQ, MQOPEN, MQPUT, MQSET, MQSUB

These verbs all take, as a parameter, a handle to the IBM MQ object on which they are to operate. Your program consists of a set of IBM MQ objects, which you act upon by calling methods on those objects.

When we 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();

Parent topic: Use IBM MQ classes for Java