Hi all,
The specs 13.3.7 says:
For a message-driven bean�s message listener methods (or interface), only the REQUIRED and NOT_SUPPORTED TransactionAttribute values may be used.
And OReilly EJB3 explains:
Message-driven beans may declare only the NotSupported or Required transaction attribute.
The other transaction attributes don't make sense in message-driven beans because they apply to client-initiated transactions. The Supports, RequiresNew, Mandatory, and Never attributes are all relative to the transaction context of the client. For example, the Mandatory attribute requires the client to have a transaction in progress before calling the enterprise bean. This is meaningless for a message-driven bean, which is decoupled from the client.
I don't understand why RequiresNew cannot be used:
For me, RequiresNew and Required both match the goal "the bean will use transaction".
And as there is no client, the transaction will always be initiated by the container.
Additionally, an
EJB Timeout callback method accepts the 3:
REQUIRED
REQUIRES_NEW
NOT_SUPPORTED
and for me, it's the same configuration: no client.
Your opinion ?
Thanks,
Beno�t
[ October 29, 2007: Message edited by: Beno�t de CHATEAUVIEUX ]