• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

how to lookup in distributed environment

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
    Bookmark Topic Watch Topic
  • New Topic