>No it is done that way for two reasons:

>1) Symmetry - JMS doesn't care that when it invokes onMessage on
>the MDB container that it actually gets delivered to a pooled EJB
>underneath. 
>The MDB either runs in the transactional context
>or suspends it (Requred or NotSupported) 
>it never controls the transaction (RequiresNew)

Understood.  However, in most cases if not all, the MDB would be operating
similiar to a RequiresNew since Requires will create a transaction if one
doesn't exist.  A CMT shouldn't exist prior to the MDB consuming the
message.  In what case would an MDB onMessage() actually join a pre-existing
CMT?

>2) There is a <MaxMessages> setting that allows you to process
>multiple messages in the same transaction/session. It would be
>a mistake for one of the MDB onMessages to commit the session
>when it still has messages to process.

After thinking about this for a while, I cannot come up with any use case
where you'd want to consume more then one message at a time in a
transactional context.  Since there is no guarantee of message ordering, or
any implicit state across messages on the queue, it seems odd to me to be
able to configure the number of messages that will be consumed in a single
CMT.  Do you have any examples of where this setting would be benefitial?

Thanks for the info and help thus far,
Dustin


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to