-->
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.  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Fri Mar 05, 2004 8:21 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
No you are not right, disconnect/close both return the session to the pool and both open/reconnect get one from the pool. I recommend you to use one session per request unless you know what you are doing.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 05, 2004 8:28 am 
Hibernate Team
Hibernate Team

Joined: Thu Dec 18, 2003 9:55 am
Posts: 1977
Location: France
michael wrote:
disconnect/close both return the session to the pool.


Ok, thanks


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 05, 2004 10:52 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
delpouve wrote:
I understand that session.close() is more expensive than disconnect because it means that the next need will have to open a new jdbc connection instead of reusing one of the pool. Am I right?

Nope, both return the conn to the poll. But session.disconnect() will keep the Hibernate session cache, and thus save time.

_________________
Emmanuel


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

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.