-->
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.  [ 3 posts ] 
Author Message
 Post subject: Any chance of db update?
PostPosted: Thu Apr 21, 2005 1:44 pm 
Newbie

Joined: Thu Oct 07, 2004 3:53 pm
Posts: 10
Given the following pseudo code:

set flush mode to commit

get object from database

make changes to object

begin transaction

make other changes to the same object

commit transaction

is there any chance (in 2.1.8 or higher) that changes made outside of the transaction block could get written to the database?

Thanks!


Top
 Profile  
 
 Post subject: Sorry, my test was bad.
PostPosted: Thu Apr 21, 2005 2:05 pm 
Newbie

Joined: Thu Oct 07, 2004 3:53 pm
Posts: 10
What I am really trying to do is make sure that only changes within a transaction block get persisted. All other changes are discarded. Seems the only reliable way to do this is to rollback prior to begin transaction calls.


Top
 Profile  
 
 Post subject: why not reloading object
PostPosted: Fri Apr 22, 2005 3:59 am 
Beginner
Beginner

Joined: Thu Apr 21, 2005 5:37 am
Posts: 45
Location: Switzerland
why don't you just reload the object from the database? That way you would have automatically discarded all changes that were made before.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.