Connecting to a queue manager

 

You are now ready to connect to a queue manager by creating a new instance of the MQQueueManager class:

MQQueueManager queueManager = new MQQueueManager("qMgrName");

To disconnect from a queue manager, call the disconnect() method on the queue manager:

queueManager.disconnect();

If you call the disconnect method, all open queues and processes that you have accessed through that queue manager are closed. However, it is good programming practice to close these resources explicitly when you finish using them. To do this, use the close() method.

The commit() and backout() methods on a queue manager replace the MQCMIT and MQBACK calls that are used with the procedural interface.


uj11080_