Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » J2EE Interest »

Re: Using JMS in a session bean

Milind Patil

2004-10-15

Replies:


you are right.. the idea behind JMS is Asynchronous communication.
But in the method call businessMethod() in sample code expecting the message to be received immediately once he sands the message.
And that is not a asynchronous communication...

There can be two possible scenarios,
1. You want to process message immediately or,
2. You wil process it afterwards when you will be free.

For first scenario, to receive message immediately, you have to have a listener associate with a queue,once a message is published on a queue.
and for another scenario, you can create queue browaser class and browse all messages in queue and pick only appropriate messges and process them.

Milind Bhaskar Patil
Tata Consultancy Services Limited
Mailto: milind.patil@tcs.com
Website: http://www.tcs.com
DISCLAIMER: The information contained in this message is intended only and solely for the addressed individual or entity indicated in this message and for the exclusive use of the said addressed individual or entity indicated in this message (or responsible for delivery of the message to such person) and may contain legally privileged and confidential information belonging to Tata Consultancy Services Limited. It must not be printed, read, copied, disclosed, forwarded, distributed or used (in whatsoever manner) by any person other than the addressee. Unauthorized use, disclosure or copying is strictly prohibited and may constitute unlawful act and can possibly attract legal action, civil and/or criminal. The contents of this message need not necessarily reflect or endorse the views of Tata Consultancy Services limited on any subject matter.
Any action taken or omitted to be taken based on this message is entirely at your risk and neither the originator of this message nor Tata Consultancy Services Limited takes any responsibility or liability towards the same. Opinions, conclusions and any other information contained in this message that do not relate to the official business of Tata Consultancy Services limited shall be understood as neither given nor endorsed by Tata Consultancy Services Limited or any affiliate of Tata Consultancy Services Limited. If you have received this message in error, you should destroy this message and may please notify the sender by e-mail.
Thank you.
=========================================================================== To unsubscribe, send email to listserv@java.sun.com and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@java.sun.com and include in the body of the message "help".

©2008 junlu.com - Jax Systems, LLC, U.S.A.