Hi All, I have 2 managed servers hosted on different IP address in a cluster and distributed clusters on different IP addresses. I have 2 different queues on these on these 2 IP addresses. Now how do I lookup these queues in distributed environment. Can any one guide me on this? Thanks in advance. ranjan
Not sure if you are looking for general step to look up the queue or some thing specific. Could you please provide some more details. If you have 2 distinct queues then the procedure shouldn't be different then the normal one as listed below: 1. Look up JMS Connection Factory in JNDI 2. Create a (Queue/Topic) Connection using the Connection Factory 3. Create a Session using the Connection 4. Look up the Queue you have created in JNDI 5. Create Message Producer/Consumer using the Queue (destination) 6. Create Queue(Topic) Sender/Receiver using Session 7. Create Message object (if Message Producer) using Session 8. Register ASync MessageListener (if Message Producer) 9. Start Connection 10.a Handle the message in onMessage method (if Message Producer) 10.b Send Message using the Sender object.
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop