This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.
No announcement yet.
pooling: ConnectionPoolDataSource & dbcpPage Title Module
javax.sql.ConnectionPoolDataSource is just a callback interface defined by JDBC, to allow concrete connections pools and JDBC drivers to interact more closely. It's basically an alternative to the java.sql.Driver interface. In either case, you need a concrete connection pool DataSource in front of it, which is what your application will access.
Essentially, don't bother with the ConnectionPoolDataSource interface too much. A Commons DBCP BasicDataSource or C3P0 ComboPooledDataSource with a JDBC driver class name specified will work nicely for typical requirements.
I've heard mixed reviews about the Jakarta Commons Pool and DBCP. The Hibernate forum guys said they may deprecate support for it in a future release of Hibernate. I would take a look at xapool or c-jdbc. c-jdbc does a lot more and is more difficult to setup, but seams to be quite powerful. Here is the link and sample spring definition for xapool. I based it on the JDBC connection example, linked off their homepage.