@Asynchronous method VS TransactionAttribute
Posted: Thu Sep 25, 2014 3:33 pm
Hello,
I've just read on session bean quiz (enthuware.oce-ejbd.v6.2.407) that "The transaction context of the caller is never propagate to the target bean's asynchronous method".
So if the asynchronous method has TransactionAttribute.REQUIRED (for CMT bean, of course) and caller has its own transaction context, the container create a new transaction and the TransactionAttribute.REQUIRED behaviour become the same of TransactionAttribute.REQUIRES_NEW.
Of course for TransactionAttribute.NOT_SUPPORT and TransactionAttribute.NEVER no transaction is created for asynchronous method.
But, what is if asynchronous method is annotated with TransactionAttribute.SUPPORT and TransactionAttribute.MANDATORY and caller has its own transaction context?
I've just tryed on weblogic express (using transaction monitoring page) and TransactionAttribute works like normal method.
Is it vendor specific ?
I'm a little bit confused.
Thanks.
I've just read on session bean quiz (enthuware.oce-ejbd.v6.2.407) that "The transaction context of the caller is never propagate to the target bean's asynchronous method".
So if the asynchronous method has TransactionAttribute.REQUIRED (for CMT bean, of course) and caller has its own transaction context, the container create a new transaction and the TransactionAttribute.REQUIRED behaviour become the same of TransactionAttribute.REQUIRES_NEW.
Of course for TransactionAttribute.NOT_SUPPORT and TransactionAttribute.NEVER no transaction is created for asynchronous method.
But, what is if asynchronous method is annotated with TransactionAttribute.SUPPORT and TransactionAttribute.MANDATORY and caller has its own transaction context?
I've just tryed on weblogic express (using transaction monitoring page) and TransactionAttribute works like normal method.
Is it vendor specific ?
I'm a little bit confused.
Thanks.