c3p0 doesn't use JNI. If you are seeing a JNI-related Exception, it has to do with your JDBC driver.
c3p0 is a highly concurrent JDBC ConnectionPooling library that whose pools are exposed via standard JNDI-bindable JDBC DataSources. It can be used to wrap "traditional" DriverManager-based JDBC drivers into pooled, bindable DataSources, or to pool Connections from DataSource-based JDBC drivers.
hibernate can be get its Connections lots of different ways. Usually, if your application server or JDBC has Connection-pooling built in, a third-party pool like c3p0 is something you'd try mainly if your disappointed with "native" pool's performance. If your driver or app server do not pool internally, one way or another you'll need a library like c3p0 (or proxool, dbcp, primrose... there are lots out there) interposed between hibernate and your database if you want decent performance,
smiles,
Steve
|