> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Nitin Sood
> 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.
Mmmh... okay. I am still under the impression that you are twisting what
MessageDriven Beans were supposed to accomplish in the first place. Remember:
they are anonymous, and just like SLSBs, the container is free to forward the
call to whatever instance it chooses. Admittedly, the container has less
freedom than for SLSBs since it has to abide by the JMS delivery rules, but
still, I don't think you should rely on the same MessageDriven Beans serving
two consecutive messages on the same queue.
This being said, couldn't you achieve a similar goal by using selectors?
--
Cedric
===========================================================================
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".