• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JMS

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
i am working in jms right now.... i am making to connection to the queue connection factory and queue through a JNDI look up... but in the project there are many queues. so doing a JNDI look up for all queues will get difficult. is there a way where i do a jndi look up for the connection factory and get the queue connection for that particular queue connection.
Thanks in advance.
Rima
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rima,

Welcome to JavaRanch

We have a "EJB and other Java EE Technologies" forum where JMS related topics are discussed. I will move this there.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

so doing a JNDI look up for all queues will get difficult



I dont think that would be difficult. You can have a utility class which when passed the name of the queue will return you the appropriate destination object. Have a look at the ServiceLocator Pattern for more details.
 
rima desai
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do you mean i will do a look up for the connection factory and i will get all the queues associated with it.
i want a way in which i dont need to do a look up for the queues. instead i do a look up for the connection factory and that in turn activates or keeps the queues associated with it ready, so that whenever there is a need to post a message on the queue this can be done easily.
if there is an alternative, do let me know.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

do you mean i will do a look up for the connection factory and i will get all the queues associated with it.
i want a way in which i dont need to do a look up for the queues.



No, that's not possible. ConnectionFactory and Queue(s) are two different entities. You will have to lookup them individually.
 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic