-->
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.  [ 4 posts ] 
Author Message
 Post subject: Session.connection
PostPosted: Fri May 04, 2007 12:16 am 
Newbie

Joined: Thu Apr 12, 2007 7:20 am
Posts: 8
hi all,

Will the session.connection() method return me the same connectio object or wil it be different each time.

what if i get a connection from session and close it then again try to take the connection from session?


plese help


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 04, 2007 12:52 am 
Newbie

Joined: Fri Mar 03, 2006 11:03 am
Posts: 19
Location: India
Hi,

It depends on your configuration. If you are using connection pooling then it will provide you new connection if its available.
or with the simplest configuration it will give the same connection object from the hibernate session.

correct me if i'm wrong.


Top
 Profile  
 
 Post subject: Session.connection
PostPosted: Fri May 04, 2007 6:37 am 
Newbie

Joined: Thu Apr 12, 2007 7:20 am
Posts: 8
I am using connection pooling.
What if i close the connection and again take a connection and start working on it


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 04, 2007 6:40 am 
Newbie

Joined: Fri Mar 03, 2006 11:03 am
Posts: 19
Location: India
The connection pooling itself is having a mechanism where it should keep the specified no of connections if there is any idle connection then its the responsibility of the mechanism to provide another connection or reconnect it.

-Vikash

_________________
get hibernate & get addicted


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