Configuring MQeJMSQueue

MQeJMSQueue is the MQe implementation of the Queue class. It is used to represent MQe queues within JMS applications. It is configured by its constructor:

public MQeJMSQueue(String mqeQMgrName, String mqeQueueName) throws JMSException

where:

If the queue manager name is null, the local queue manager is used (that is, the queue manager that JMS is connected to). If the queue name is null, a JMSException is thrown.

When the queue has been configured, it can either be stored in a JNDI directory, so that it can be looked up by application programs, or it can be used directly in an application program. There is an alternative way to configure a queue within an application, by using the QueueSession.createQueue() method. This takes one parameter, which is the name of the queue. For MQe JMS this can either be the queue manager name followed by a plus sign followed by the queue name:

ioQueue =session.createQueue("myQM+myQueue");

or just the queue name:

ioQueue =session.createQueue("myQueue");

If the queue name is used on its own, the local queue manager is assumed.

Note: MQe JMS can only put messages to a local queue or an asynchronous remote queue and it can only receive messages from a local queue. It cannot put to or receive messages from a synchronous remote queue.

Terms of use | WebSphere software

(c) Copyright IBM Corporation 2004, 2005. All rights reserved.