This content has been marked as final.
Show 1 reply
-
1. Transactions in a Container Managed Bean
mircea.markus Apr 12, 2011 10:23 AM (in response to denramos)I've created a test purposely throwing an application exception (with rollback="true") prior to the end of the method, but it still seems to commit. Looking at the examples, it shows that you need to get the transaction manager from the advanced cache. Is this a necessary step for my case?
As long as the call to infinispan is in a transactional context AND you use the right TransactionManagerLookup for your envirpnment this should work fine.
I actually can't begin and commit transactions explicitly as described in the documentation example, because my bean transactions are container managed. Is there any way of doing this?
You don't need to manage them by hand. If you're confident that the method runs in a transactional context, then most likekly it's the TransactionManagerLookup that is not properly configured.