Originally posted by Kyle Brown: If you set the number of MDB's in the pool to 1, then you have, in effect, made the MDB single-threaded. Kyle
I do not think it ensures the single thread. The number of bean instances outside the pool can well be greater than one. Those instances run concurrently. I heard that JBoss supports single-threaded MDB.
Jim, I don't understand how this could be true. The MDB's in the method-ready pool are the only things that can accept onMessage() methods. If the number of EJBs in this pool is exactly one (both minimum and maximum) then while that instance is busy no other processing can take place. I don't understand what you mean by "instances outside the pool". AFAIK, there should be no instances outside the pool. Even if they were, why would they be running concurrently? Kyle
That is true. However that is generally true of messaging systems where there are more than one client processing messages off a shared queue. In that case, you need something like a Resequencer. By the way, I have to make a shameless plug here. If you're REALLY interested in design for messaging systems and solving problems like this, take a look at Enterprise Integration Patterns by Bobby Woolf and Gregor Hohpe, (with Martin Fowler and me contributing) which covers this and a host of other tough problems in messaging design. Kyle [ November 26, 2003: Message edited by: Kyle Brown ]