-->
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: What about no close on connection from session.connection()?
PostPosted: Wed May 03, 2006 11:07 am 
Newbie

Joined: Wed Apr 13, 2005 9:38 am
Posts: 7
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

I use hibernate 3.0.5 now,
and want to upgrade to 3.1.3,
the migration guide http://hibernate.org/250.html said:
"Important known issue: If you call session.connection() in Hibernate 3.1.0, you are responsible to close() the JDBC Connection yourself! "

But I really donnt want to close the connection,
because it is needed for view.
And I tested it without close, nothing happen!!
Who can tell me the result of no close session.connection()?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 03, 2006 10:02 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
That depends on how you do your connection pooling. The most likely result is that you'll lose connection resources, eventually running out of connections and losing the ability to talk to the DB. If you use user-provided connection pooling, you can avoid that issue, because it's your own code that closes the connections anyway.

_________________
Code tags are your friend. Know them and use them.


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.