-->
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.  [ 5 posts ] 
Author Message
 Post subject: Why doesn't close flush?
PostPosted: Fri Jan 30, 2004 9:08 pm 
Expert
Expert

Joined: Thu Jan 08, 2004 6:17 pm
Posts: 278
Why doesn't session.close() do a session.flush()?

Definitely not intuitive if you're used to java.io's behavior! And it's bitten me a few times already. I kind of want to postpone my flushes as long as possible, and in fact in some cases I want to postpone them to the end of my thread-local-session.

I suppose I could add a flush() in my finally-close logic, but I'm just wondering why I would have to. What's the *benefit* of having to remember to flush before you close?

Cheers!
Rob


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 7:49 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
If my hibernate session raise an execption, i close it but don't flush (it would produce more errors)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jan 31, 2004 10:12 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Because commit() flushes.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 10:07 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
LOL, Gavin, you know most people don't commit, it's too time consuming :)

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 01, 2004 11:56 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
LMAO


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.