migrated from commons-dbcp to tomcat-jdbc

This commit is contained in:
Mic 2013-06-05 08:59:59 +08:00
parent b8b8e5a4ba
commit d1cc655aae
2 changed files with 12 additions and 7 deletions

View file

@ -19,8 +19,10 @@
<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
<context:property-placeholder location="classpath:spring/data-access.properties"/>
<!-- DataSource configuration for Apache Commons DBCP. -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
<!-- DataSource configuration for the tomcat jdbc connection pool
See here for more details on commons-dbcp versus tomcat-jdbc:
http://blog.ippon.fr/2013/03/13/improving-the-performance-of-the-spring-petclinic-sample-application-part-3-of-5/-->
<bean id="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource"
p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}"
p:username="${jdbc.username}" p:password="${jdbc.password}"/>