Skip to content
Snippets Groups Projects
Commit d1cc655a authored by Mic's avatar Mic
Browse files

migrated from commons-dbcp to tomcat-jdbc

parent b8b8e5a4
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@
<hibernate-validator.version>4.3.1.Final</hibernate-validator.version>
<!-- Database access -->
<commons-dbcp.version>1.4</commons-dbcp.version>
<tomcat-jdbc.version>7.0.37</tomcat-jdbc.version>
<ehcache.version>2.6.6</ehcache.version>
<hsqldb.version>2.2.9</hsqldb.version>
......@@ -159,11 +159,14 @@
</dependency>
<!-- Database connection pool -->
<!-- Database 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/
-->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<version>${tomcat-jdbc.version}</version>
<scope>runtime</scope>
</dependency>
......
......@@ -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}"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment