-->
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: is Session.flush() necessarily atomic?
PostPosted: Thu Mar 30, 2006 6:46 pm 
Newbie

Joined: Tue Feb 07, 2006 8:17 pm
Posts: 19
currently we have FlushMode.NEVER and flush the session manually before we close it.
Is this guaranteed to be atomic or do we need to delve into the transaction API?

thanks, Tom


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 30, 2006 9:59 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
Well, it's guaranteed to flush all outstanding operations in one lump, but it's only going to be DB-atomic if you're using a transaction. Transactions are recommended even if you're not interested in atomicity. Some people will recommend using transactions even for read-only DB access.

In short: no, flush does not give you DB-level atomicity.


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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.