We would like to cache read/write data in our system. We currently have a caching solution built on an opensource caching product -- jocache. If it matters we're currently using WebLogic 6.1. Our DAO layer is a homebrew hodgepodge.
The issue with caching writable data is that if a transaction is in effect, we must not "commit" cached data changes (updates/creates) if the transacton is rolled-back. What I mean by "commit" in this sense is update the cache with the new data, to reflect the state of the underlying database. In WL, it looks like we can deploy our own JCA to become "transactionally aware" to JTA.
Is there a more general solution to this issue that is not J2EE/WebLogic-dependent (Spring-provided or otherwise). I'd rather not be tied to J2EE but I Haven't seen any way to get callbacks during the transaction life cycle with anything then JTA.