swaldman / c3p0

a mature, highly concurrent JDBC Connection pooling library, with support for caching and reuse of PreparedStatements.
http://www.mchange.com/projects/c3p0
Other
1.28k stars 338 forks source link

How to properly probe a new connection pool? #148

Closed osheroff closed 2 years ago

osheroff commented 4 years ago

Hello, recently moved maxwell (https://github.com/zendesk/maxwell) over to c3p0, generally most seems to be working fine, but this issue was raised recently:

https://github.com/zendesk/maxwell/issues/1499

In this issue the user probably has a fairly basic misconfiguration, but due to c3p0's architecture, all we're telling them is "could not get a connection from the underlying database". This seems highly user-unfriendly, so I'm working on fixing it.

What I've come up with is this : https://github.com/zendesk/maxwell/pull/1504/files#diff-77486a090c70ee69435a51000330e8a4R41

Just wondering if there's a better approach than this.

thx, osheroff