public MQQueueManager(String queueManagerName)
Throws MQException.
Creates a connection to the named queue manager.
The following example shows a connection to a queue manager MYQM, running on a machine with hostname fred.mq.com.
MQEnvironment.Hostname = "fred.mq.com"; // host to connect to MQEnvironment.Port = 1414; // port to connect to. // If I don't set this, // it defaults to 1414 // (the default WebSphere MQ port) MQEnvironment.Channel = "channel.name"; // the CASE-SENSITIVE // name of the // SVR CONN channel on // the queue manager MQQueueManager qMgr = new MQQueueManager("MYQM");
If the queue manager name is left blank (null or ""), a connection is made to the default queue manager.
See also MQEnvironment.
public MQQueueManager(String queueManagerName, int options)
Throws MQException.
This version of the constructor is intended for use only in bindings mode, that is, when connecting to a local server. It uses the extended connection API (MQCONNX) to connect to the queue manager. The options parameter allows you to choose fast or normal bindings. Possible values are:
public MQQueueManager(String queueManagerName, Hashtable properties)
Throws MQException.
The properties parameter takes a series of key/value pairs that describe the WebSphere MQ environment for this particular queue manager. These properties, where specified, override the values set by the MQEnvironment class, and allow the individual properties to be set for any queue manager. The properties which may be specified are as follows:
For descriptions of these properties, see the corresponding property description in MQEnvironment. Figure 6 shows an example of a program to create a queue manager with its user ID and password defined in a hash table.
Hashtable properties = new Hashtable(); properties.Add( MQC.USER_ID_PROPERTY, "ExampleUserId" ); properties.Add( MQC.PASSWORD_PROPERTY, "ExamplePassword" ); try { mqQMgr = new MQQueueManager("qmgrname", properties); } catch (MQException mqe) { System.Console.WriteLine("Connect failed with " + mqe.Message); return((int)mqe.Reason); }
public MQQueueManager(String queueManagerName, String channel, String connName)
Throws MQException.
Connects to the named Queue Manager, using the supplied 'Server Connection Channel' and connection.
public MQQueueManager(String queueManagerName, Int options String channel, String connName)
Throws MQException.
Connects to the named Queue Manager, using the supplied 'Server Connection Channel' and connection, and passing the supplied options.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzav0463 |