-
1. Re: Infinispan and Transactions
mandarbk Nov 22, 2012 4:44 AM (in response to mandarbk)Does infinispan provide the ability to remove previously added entry in the cache once the corresponding transaction is rolled back ?
This is essentially the same Atomicity guarantees provided by a persistent datastore such as RDBMS.
-
2. Re: Infinispan and Transactions
dan.berindei Nov 23, 2012 1:42 PM (in response to mandarbk)Actually Infinispan doesn't write anything to the cache until the transaction is committed, so there's nothing to roll back - provided that the cache really is transactional, the default is not.
You can enable transactions via the transactionMode attribute of the transaction element. There's an attribute for customizing the transaction manager lookup as well (transactionManagerLookupClass), but as you guessed the default should work with AS7.
-
3. Re: Infinispan and Transactions
mandarbk Nov 24, 2012 5:51 AM (in response to dan.berindei)Finally, I was able to resolve the issue.Looks like the application code was modifying the value(map) stored in the cache. Since it was not a cache operation as such, those modifications were persistent even if the transaction is rolled back. My mistake....
-
4. Re: Infinispan and Transactions
dan.berindei Nov 24, 2012 6:02 AM (in response to mandarbk)NP Mandar, I'm glad to hear you figured it out!