What's the difference between MysqlConnectionPoolDataSource and C3p0, BoneCP or dbcp library for connection pooling? I don't understand why use a library if mysql connector give connection pooling.
A ConnectionPoolDataSource
is not a connection pool (or at least: it shouldn't be), it is intended to be used by a DataSource
that provides pooling (eg from an application server). A ConnectionPoolDataSource
provides the physical connections that will be held in the connection pool. Besides creating those physical connections a ConnectionPoolDataSource
shouldn't do anything else.
So if you are working in an application server, use the pooling provided by the DataSource
s of the application server. If you are in a standalone application or a server that doesn't provide datasources on its own, use third party connection pools like BoneCP, c3p0 or Apache DBCP. If MySQL also provides a normal DataSource
that provides pooling, then you could use that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With