-->
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: Keeping Hibernate constantly connected to the database
PostPosted: Sun Sep 11, 2011 6:55 am 
Newbie

Joined: Sat Sep 03, 2011 10:16 am
Posts: 10
Hi,

I'm building a regular desktop application with an embedded database.
Right now Hibernate seems to disconnect from the database whenever I commit() a transaction:
Code:
13:48:27,752 DEBUG JDBCTransaction:143 - committed JDBC Connection
13:48:27,752 DEBUG ConnectionManager:427 - aggressively releasing JDBC connection
13:48:27,752 DEBUG ConnectionManager:464 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]


Is there a way to tell it to keep connected until the application exits?

I'm using a sessionFactory with .getCurrentSession() in my utility functions.


Top
 Profile  
 
 Post subject: Re: Keeping Hibernate constantly connected to the database
PostPosted: Sun Sep 11, 2011 10:38 am 
Newbie

Joined: Sat Sep 10, 2011 10:22 pm
Posts: 8
See the section 13.1.2. Long conversations in the Hibernate manual for a good discussion of how to handle long conversations.


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.