Is there a way to programatically ask c3p0 how many of it’s connections are being used, or perhaps logs when the pool is exhausted.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As indicated in the URL referenced by Austin’s comment above, you can use JMX to inspect and modify running c3p0 PooledDataSources.
You can also do so programmatically. c3p0’s PooledDataSources have an elaborate API for inspecting their state:
http://www.mchange.com/projects/c3p0/apidocs/com/mchange/v2/c3p0/PooledDataSource.html
If you are using ComboPooledDataSource, you have access to an even richer API.
http://www.mchange.com/projects/c3p0/apidocs/com/mchange/v2/c3p0/ComboPooledDataSource.html
I hope this helps!