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.
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.
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....
NP Mandar, I'm glad to hear you figured it out!