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

2008-04-07 Thread [EMAIL PROTECTED]
Unfortunately, this solution isn't as straight forward as it may seem. The problem seems to be, when a transaction is COMMITTED, my notification routine may contain code that calls stateless session bean methods. This causes problems (at this stage) due to the container thinking the transaction

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

2008-02-14 Thread ALRubinger
Great; post back with results when you've got 'em? S, ALR View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4129347#4129347 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4129347 ___

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

2008-02-14 Thread [EMAIL PROTECTED]
I've changed the code to use CMT with a TransactionAttributeType.REQUIRES_NEW and it works perfectly. Thanks for you help. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4129348#4129348 Reply to the post :

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

2008-02-14 Thread [EMAIL PROTECTED]
Makes sense. Your help has been much appreciated. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4129337#4129337 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4129337 ___

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

2008-02-13 Thread ALRubinger
You can register your own Synchronization implementation with the current Tx and listen in on afterCompletion, looking for a status of success: http://java.sun.com/javaee/5/docs/api/javax/ejb/SessionSynchronization.html S, ALR View the original post :

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

2008-02-13 Thread ALRubinger
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.

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

2008-02-13 Thread [EMAIL PROTECTED]
Thanks for the reply. I have read this only applies to stateful session beans. I am using stateless. Do you know of anywhere I may obtain an example ? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4129187#4129187 Reply to the post :

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

2008-02-13 Thread [EMAIL PROTECTED]
Thanks for that, the event triggered OK. However, during this event I am attempting to create a manual UserTransaction. Unfortunately the begin() method this is throwing an NotSupportedException, due the fact that even thought the transaction status is COMMITTED the UserTransaction thinks not.

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

2008-02-13 Thread ALRubinger
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