-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate cache consistency in JTA transaction
PostPosted: Thu Sep 18, 2003 10:31 am 
Newbie

Joined: Mon Sep 15, 2003 8:06 am
Posts: 8
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 18, 2003 10:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Just specify the "transaction.manager_lookup_class" and "jta.UserTransaction" attributes in your config file so that Hibernate can retreive the TransactionManager instance in order to register a synchronization.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.