JMS CreateQueue Question

I have a general question about the JMS createQueue method. Does WebSphere MQ use this method as an alternative to finding JNDI? I thought I could dynamically create a queue. Is it possible? Thanks.

+3
source share
2 answers

Assuming what you mean QueueSession.createQueue, this is a very misleading method and does not do what you think:

Creates a queue identifier specified in the queue name.

, . . , .

, . - JMS API. , createTemporaryQueue.

JMS API ( , , -). , , WebSphere.

+3

Creates a queue identity given a Queue name.

This facility is provided for the rare cases where clients need to dynamically
manipulate queue identity. It allows the creation of a queue identity with a
provider-specific name. Clients that depend on this ability are not portable.

Note that this method is not for creating the physical queue.
The physical creation of queues is an administrative task and is not to be
initiated by the JMS API. The one exception is the creation of temporary queues,
which is accomplished with the createTemporaryQueue method.

, JMS . , , JMS-. JMS - -API, .

createQueue(), , . JMSException.

, createTemporaryQueue() . delete() , .

+1

Source: https://habr.com/ru/post/1718206/


All Articles