http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJMSMessageListener defines
"maxMessages" as follows:
anonymous wrote :
| maxMessages - read this number of messages before delivering messages to the mdb (each
message is delivered individually on the same thread in an attempt to avoid context
excessive context switching) - default 1
|
Which seems to behave as one would like it. Set it to two, and two messages are processed
at a time. Set it to four, and four get processed at a time. And that number of MDBs get
constructed.
In other words, maxMessages seems to define the number of MDBs that will be instantiated,
and each MDB is single threaded. Is this correct?
In EJB2, there you could configure min-pool-size and max-pool-size, but the MDBs seemed to
be multi-threaded. Certainly, setting max-pool-size to 1 did not turn your bean into a
singleton. So EJB3 would definitely seem to be a step forward. Having said that, is it
possible or relevant to ask about controlling the "threadedness" of EJB3 MDBs?
Am I right to assume that I don't need to worry about it?
Thanks in advance for the clarification!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093213#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...