• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS

 
rima desai
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!