[seam-dev] Implementing REQUIRES_NEW for seam transaction management

Stuart Douglas stuart at baileyroberts.com.au
Wed Aug 26 20:55:15 EDT 2009


I would like to implement REQUIRES_NEW as a transaction type for the
@Transactional annotation. My basic plan is:

- Create a TransactionManager component that can be installed into
components.xml, and give the option to configure the JNDI location of
the JTA TransactionManager.

- modify the Work.workInTransaction method to check if the existing
transaction need to be suspended, as if so use the TransactionManager
component to suspend and resume the transaction.

I can't help thinking that there is some problem with this approach,
otherwise someone else would have already done it. 

I also know that TransactionManager is not supposed to be used by the
application, does anyone know if this will cause problems?

I would also like to implement the ability to control seam global
transactions based on a flag in pages.xml, so they can be disabled for
specific views. Would anyone have any objections to this?

Stuart




More information about the seam-dev mailing list