petclinic-uncached
Details
pom.xml 13(+8 -5)
diff --git a/pom.xml b/pom.xml
index 410afc2..ddeaeac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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>
diff --git a/src/main/resources/spring/datasource-config.xml b/src/main/resources/spring/datasource-config.xml
index c68c422..0151d27 100644
--- a/src/main/resources/spring/datasource-config.xml
+++ b/src/main/resources/spring/datasource-config.xml
@@ -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}"/>