messaging icon indicating copy to clipboard operation
messaging copied to clipboard

Add methods to get a Destination.

Open glassfishrobot opened this issue 11 years ago • 6 comments

Currently, the JMS API has no clear way of looking up a Queue or Topic. It's typically assumed to use JNDI, however when you're in Java SE there is no single entry point that allows one to look up a Queue or Topic.

Typically, permanent Queues/Topics are created via configuration (XML files, metadata, etc). As a result, I think we should add methods to ConnectionFactory/JMSContext/Connection that allows a developer to get a destination.

Affected Versions

[2.0]

glassfishrobot avatar Sep 02 '13 17:09 glassfishrobot

  • Issue Imported From: https://github.com/javaee/jms-spec/issues/135
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: Unassigned

glassfishrobot avatar Feb 12 '18 18:02 glassfishrobot

@glassfishrobot Commented Reported by genomeprjct

glassfishrobot avatar Sep 02 '13 17:09 glassfishrobot

@glassfishrobot Commented genomeprjct said: This may be as simple as clarifying that createQueue/createTopic should/should not be specific to temporary queues/topics. Looking at two open implementations (OpenMQ and HornetQ), one allows this to return temporary destinations, the other does not.

glassfishrobot avatar Sep 02 '13 17:09 glassfishrobot

@glassfishrobot Commented chris.barrow said: Methods createTemporaryQueue and createTemporaryTopic are provided for temporary destinations. AFAIK createQueue and createTopic are for non-temporary destinations. Many JMS providers allow these to be used to create new (dynamic) queues and topics. Their function is "get or create", so they can be used instead of doing a JNDI lookup.

glassfishrobot avatar Sep 03 '13 16:09 glassfishrobot

@glassfishrobot Commented @nigeldeakin said: The methods createQueue and createTopic provide a way for an application to obtain a Queue or Topic object identified by the specified name.

These methods are not intended to create the underlying queue or topic in the JMS provider but are simply ways of obtaining a Queue or Topic object which refers to an existing queue or topic.

(I know some JMS providers do support automatic creation of queues and topics but this is not a requirement of these methods.)

Can you say more about why these methods do not meet your needs? Are you asking for methods to physically create the queue or topic in the JMS provider?

glassfishrobot avatar Sep 03 '13 17:09 glassfishrobot

@glassfishrobot Commented This issue was imported from java.net JIRA JMS_SPEC-135

glassfishrobot avatar May 02 '17 10:05 glassfishrobot