-->
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: Shutdown via SessionFactory.close() and HSQLDB
PostPosted: Mon Jan 26, 2004 12:34 pm 
Newbie

Joined: Mon Jan 26, 2004 12:22 pm
Posts: 4
Hello,

I am using Hibernate and HSQLDB in Standalone (or In-Process) mode. The HSQL docs state that in order to shutdown the database correctly, all connections must be closed.

I have setup Hibernate to use the C3P0 connection pool, which I have configured with a minimum of 1 connection (so that the HSQL DB remains open while the app is running).

Based on the javadoc, I would have thought that calling sessionFactory.close() would have caused all connections to be closed, thus shutting down HSQL DB as well. However, when I look at my databases db.properties file, modified=yes which, according to the HSQL docs, indicates the db was not shutdown correctly.

Any ideas?

Cheers,
Raman Gupta


Top
 Profile  
 
 Post subject: Re: Shutdown via SessionFactory.close() and HSQLDB
PostPosted: Mon Jan 26, 2004 4:24 pm 
Newbie

Joined: Mon Jan 26, 2004 12:22 pm
Posts: 4
raman wrote:
I have setup Hibernate to use the C3P0 connection pool, which I have configured with a minimum of 1 connection (so that the HSQL DB remains open while the app is running).

Based on the javadoc, I would have thought that calling sessionFactory.close() would have caused all connections to be closed, thus shutting down HSQL DB as well. However, when I look at my databases db.properties file, modified=yes which, according to the HSQL docs, indicates the db was not shutdown correctly.


Use the source Luke! Stupid me, looking at the source for C3P0ConnectionProvider, it looks like their is no C3P0 API for closing the connection pool (unbelievably). Using the DBCP connection pool and calling SessionFactory.close() works fine.

Cheers,
Raman Gupta


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.