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

ALRubinger do-not-reply at jboss.com
Wed Feb 13 10:44:44 EST 2008


You may also:

* Look up the TransactionManager from JNDI (or inject it using @Resource) and register with the Thread's Tx by calling tm.getTransaction().registerSynchronization().  You might want to further abstract this using an Interceptor (AOP) if you want to apply this across many EJBs.

* If hooking in from an Entity Bean, listen in on an event (ie. PostUpdate) and call event.getSession().getTransaction().registerSynchronization()

S,
ALR

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

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



More information about the jboss-user mailing list