Hello Friends, I have one query related to JMS Queue, It is said that,"Multiple Queue senders & queue rceivers can be associated with a single queue, but an individual messsage can be delivered to only one queue receiver".
Well, the point of confusion is,how Message Store(or application server) routes the message to appropruate MDB as we do not send the address information related to receiver? In short, if M1 & M2 are two MDBs attached to same queue ,can i send 2 messages to the same queue one for M1 & another to M2?
In short, if M1 & M2 are two MDBs attached to same queue ,can i send 2 messages to the same queue one for M1 & another to M2?
That is dangerous because the EJB spec does not define what must happen if there is more than one consumer for a particular queue. The result will be unpredictable for different EJB containers and maybe different versions of the same EJB container. So, don't do it!
Of course, you can send multiple messages at about the same time to the same queue for the same MDB type. What will probably happen is that an instance will be pulled from the pool to service each request (subject constraints such as the maximum size of the pool) in a separate thread.
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
Joined: Aug 27, 2004
Hello Roger, Do you want to say that a single queue is configured for single MDB? & its not possible to for two diffrent MDBs to listen to a single queue.