MQQueueManager

 

public MQQueueManager(String queueManagerName) throws MQException;

Creates a connection to the named queue manager.

The host name, channel name and port to use during the connection request are specified in the MQEnvironment class. This must be done before calling this constructor.

The following example shows a connection to a queue manager "MYQM", running on a system with host name "fred.mq.com".

MQEnvironment.hostname = "fred.mq.com";  // host to connect to
MQEnvironment.port     = -1  ;           // port to connect to.  If not set,
                                         // this defaults to 1414 for WebSphere MQ
                                         // client connections.
MQEnvironment.channel  = "channel.name"; // the CASE-SENSITIVE name of the SVRCONN
                                         // channel on the queue manager
MQQueueManager qMgr    = new MQQueueManager("MYQM");
 

If the queue manager name is null or blank, then a connection is made to the default queue manager.

Parameters

  • queueManagerName - the name of the queue manager to which to connect.

Exceptions

  • MQException - if there are connection problems.


uj14890_