I'd emailed Steve Waldman about his C3P0 project and got this response about the 0.8.3 C3P0 passed out with Hibernate 2.0.2 & 2.0.3:
---------------
You'll have to upgrade to the latest 0.8.4 test release, but if you do,
you can force DataSources to clean themselves up by calling the static
method DataSources.destroy(DataSource pooledDataSource ), or
equivalently by casting the DataSource to a
com.mchange.v2.c3p0.PooledDataSource and calling its close() method.
---------------
Regardless, yesterday I commented out my C3P0 settings and added
<property name="dbcp.minIdle">1</property>
to my hibernate.cfg.xml files. It got rid of most of my emory problems since C3P0 was eating up memory and never exiting until I shut down Tomcat. I think I still have a leak somewhere but I haven't found it yet (though I'm sure I've freed everything up).
Regards,
David
|