When the bean instance sends the message to the administered queue,
it sets the reply to field to the temp queue which it created.
The MessageConsumer(a java class or a MessageDriven bean) on the
administered queue which gets the message .....does some business logic and
then
replies(does a JMS send) using  replyto field which is set to the tempQueue
which was created by the bean.
***This allows routing of the message to the correct bean instance***.
And thats the purpose of the tempDestination
as metioned in the JMS spec(atleast for non-bean java objects)
So each bean instance has its own private temp queue for getting messages
back.
I did not use administered queues because I wanted the tempQueue to last
as long as the stateful bean in there.  If all the beans receive message on
the same
queue(say a administered queue), I will have to write my own filtering
logic. By using the replyTo field and temp queue, that resposibility of
dynamic routing is left to the JMS provider.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to