If I use the following Bean declaration with a jdbcTemplate,
can I automatically assume that connection pooling is being used?
Please notice the usage of
apache.commons.dbcp.BasicDataSource vs springframework.jdbc.datasource.DriverManagerDataS ource
...
import org.apache.commons.dbcp.BasicDataSource;
// (INSTEAD OF org.springframework.jdbc.datasource.DriverManagerD ataSource;
...
@Bean
public BasicDataSource dataSource() {
Thanks
can I automatically assume that connection pooling is being used?
Please notice the usage of
apache.commons.dbcp.BasicDataSource vs springframework.jdbc.datasource.DriverManagerDataS ource
...
import org.apache.commons.dbcp.BasicDataSource;
// (INSTEAD OF org.springframework.jdbc.datasource.DriverManagerD ataSource;
...
@Bean
public BasicDataSource dataSource() {
BasicDataSource ds = new BasicDataSource();
ds.setDriverClassName(environment.getProperty("db. driverclass"));
ds.setUrl(environment.getProperty("db.url"));
ds.setUsername(environment.getProperty("db.usernam e"));
ds.setPassword(environment.getProperty("db.passwor d"));
return ds;
}Thanks