• 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

setjmsreply in JMS

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Can anybody tell me whats the use of sending a message to the destination in this way ?

TextMessage request = qSession.createTextMessage();
request.setJMSReplyTo(myQueue);

Thanks in advance,
parineeta
 
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When the application which posts a message expects a response to the message, it sometimes creates a temporary queue and sets this temporary queue in the replyTo property.

Clients which receive the message can post back to this temporary queue with a response. Often the jms correlation id is used to link the two - the request and response messages.

ram.
 
parineeta kumar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ram,
Thanks for your reply.
Actually i understood its purpose but i am confused in creating temperory queues.
As per my understanding the temperory queues are created dynamically and is used within the same connection and once the connection is closed the temperory queues are deleted.

So in this case how is it possible for another application to connect with this temperory queue and send the reply?

Can you please clear this doubt for me?

thanks in advance.
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's so but you should know that Connections are usually cached and not created every time a new message needs to be sent. Usage of temporary destinations for request-response in jms is standard architecture practise in enterprise systems. It has its advantages and disadvantages. Here is an excellent article explaining it's usage.

ram.

 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic