Hi,

I am running an app on JBoss 3.2.3 (SPARC 1.4.1_05-b01 VM). The application uses a 
number of MDBs that are a sink of P2P JMS messages.
I have noticed that the call to sender.send() can take a long time to return, and the 
length of time appears to be linked to the processing duration of the MDB onMessage() 
method (i.e. the call to send() appears to be almost synchronous wrt to the MDB that 
processes the message).

I am using the JVM invocation layer because everything occurs within the EJB 
container. The MDB components are set to Bean managed trx management, and AFAIK this 
should result in the container auto acknowledging receipt of messages by the MDB.

The flow of control is like this;

1. A Stateless Session EJB component sends a message to a queue Q1
2. An MDB instance MDB1 is the recipient of Q1.
3. MDB1 does its processing and then sends an arbitrarily configurable number of 
messages to a queue Q2. This thread then does a wait().
4. One or more MDB instances MDB2 are the recipient(s) of Q2.
5. Each MDB2 instance does its processing and then sends a message to queue Q3.
6. An MDB instance MDB3 receives the message Q3.
7. MDB3 does its processing, and then checks if it is the last thread of control that 
were set off as a result of the messages in step 3. If so it uses notify() to wake up 
the thread that is waiting in 3.
8. MDB1 checks whether it needs to send any more messages, and if so return to step 4.

A pseudo sequence diagram is as follows;


  | SSB -- M1 --> Q1 --> MDB1 -- M2 --> Q2 --> MDB2 -- M3 --> Q3 --> MDB3
  |                           -- M2 --> Q2 --> MDB2 -- M3 --> Q3 --> MDB3
  |                           -- M2 --> Q2 --> MDB2 -- M3 --> Q3 --> MDB3
  | 

The reason that it is designed this way is in the interests of flow control, and also 
to be able to take advantage of an SMP host with respect to the processing of M2 that 
can be done in parallel. Because it takes so long for the sender.send() call to return 
in MDB1 this benefit is reduced though.

Thanks and regards,
Andrew

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3851468#3851468

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3851468


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to