Hello
Is there a way to force the hibernate session cache to synchronize
with a JTA transaction ? AFAIK, JTA integration of hibernate deals
with connections used by hibernate but not the cache.
Say I have an object in my cache. Then I open a JTA transaction.
Then I modify my object via hibernate, do a update and a flush, then
rollback the JTA transaction. After that :
- JTA ensures that nothing happened in the DB (object still in the state
before transaction begins)
- object in the hibernate session left in the updated state (inconsistent
with DB)
How can we register the hibernate session cache as a XAResource so that
it 'rewinds' back to pre-transaction state on rollback of the JTA transaction ?
Thanks in advance for any advice (targeted WAS : jonas and weblogic).
Emmanuel Ligne
|