How can I directly use the com.swiftmq classes and forgo JNDI?
I do realize that looking up resources via JNDI is the best way to handle
these situations. However, I'm interested in what exactly is going on
behind the scenes. Specifically, how would the following code (from the
samples) be implemented using the com.swiftmq classes instead of the JNDI
code found in SampleUtilities?
// Topics Sample
topicConnectionFactory = (TopicConnectionFactory)
SampleUtilities.jndiLookup(SampleUtilities.TOPICCONFAC);
topicConnection = topicConnectionFactory.createTopicConnection();
topic = (Topic) SampleUtilities.jndiLookup(topicName);
topicSession = topicConnection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
// Queue Sample
queueConnectionFactory = (QueueConnectionFactory)
SampleUtilities.jndiLookup(SampleUtilities.QUEUECONFAC);
queueConnection =
queueConnectionFactory.createQueueConnection();
queue = (Queue) SampleUtilities.jndiLookup(queueName);
queueSession = queueConnection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
Thanks,
Nathan
P.S. Again, this is to satisfy my curiosity. I would certainly use JNDI in
production.
------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/developers@mail.iit.de/