[jboss-user] [EJB 3.0] - Re: Listener for CMT commit/rollback

ALRubinger do-not-reply at jboss.com
Wed Feb 13 12:08:05 EST 2008


See, now you're trying to combine BMT and CMT within the same Thread, and in a CMT-enabled context.  That's a no-no. :)

Haven't tested this technique post-commit, but try marking the method you'd like to call after commit succeeds with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW).  From EJB3 Core Spec:

"13.6.2.4" wrote : If a client calls with a transaction context, the container suspends the association of the transaction context with the current thread before starting the new transaction and invoking the business method. The container resumes the suspended transaction association after the business method and the new transaction have been completed.

...or you can perform an asynchronous invocation as outlined in http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_extensions.html or delegate the invocation to JMS for execution by an MDB listener.

S,
ALR

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129216#4129216

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129216



More information about the jboss-user mailing list