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