Tip to test if Hibernate / C3P0 database pool connections are really idle

Set some fairly aggressive C3P0 configuration settings in your hibernate config.

hibernate.c3p0.min_size=0
hibernate.c3p0.idle_test_period=30

and the system property

c3p0.maxIdleTimeExcessConnections=10

Open up a database session and close it. Wait For about 30 seconds and verify that the number of database sessions are really 0 .

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s