-->
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: closing Connection
PostPosted: Wed Mar 30, 2005 10:49 am 
Newbie

Joined: Sun Dec 26, 2004 4:44 pm
Posts: 7
Location: Estonia
Hi,

I need to use some plain JDBC, so I get Connection from the Session:

Session.connection()

My question is: do I need to close this Connection or not?
If I close it and perform some action on this session (find f.ex.) then hibernate says that Connection closed , otherwise, I have connection leaking.

_________________
--------------------
wbr,
Vladimir


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 30, 2005 11:32 am 
Expert
Expert

Joined: Fri Nov 07, 2003 4:24 am
Posts: 315
Location: Cape Town, South Africa
If you rely on hibernate to obtain the connections, then you should rely on hibernate to close the connection.


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.