Obtaining JMS Destination from Session Object

  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation

                                               

Summary: The easiest way to obtain a JMS destination – from the Session object.

Overview

The easiest way to obtain a JMS destination is to retrieve it from the Session object.

  • To obtain a Queue, use createQueue() from the QueueSession:
    Queue queue = queueSession.createQueue (destName);
  • To obtain a Topic, use createTopic() from the TopicSession:
    Topic topic = topicSession.createTopic(queueName);

In both cases, use destName as the name of the desired queue or topic.
Results of these methods vary depending on the fundamental messaging product used. JMS specifications state that creating topics and queues is administrative in nature and is not performed by JMS. It may be necessary to use an administrative tool, specific to the messaging product you are using, to create the destination first, and then afterwards, use the JMS methods to obtain a Queue or Topic object to represent them.


Wiki Content Tree


Your Feedback Needed!

We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.

Labels

 
(None)