I am currently looking at an application that uses Spring and Spring JDBC.
http://static.springsource.org/spring/docs/2.0.x/reference/jdbc.html
I can’t find from the doc ways / where to configure settings such as set pool size, re-connection, test on borrow.
Am i missing something here? I am new to Spring. Is it that this plain vanilla JDBC option does not allow me to do what is described or is it that i would need something like c3po library?
These properties are not part of Spring but underlying
DataSourceimplementation. First you have to include some database pooling library like dbcp:Once you added this library you configure the provided
DataSourceimplementation:You can also choose different
DataSourceimplementations like c3p0. Finally you can obtainDataSourceconfigured in your application server, e.g. using jndi. Spring JDBC support uses anyDataSourceimplementation provided. Also Spring ships with some very simpleDriverManagerDataSourceintended for testing.