Switching to Tomcat JDBC

This commit is contained in:
Julien Dubois 2013-03-02 00:04:54 +01:00
parent 3388f317f4
commit bb1b399771
2 changed files with 8 additions and 12 deletions

13
pom.xml
View file

@ -12,7 +12,6 @@
<properties>
<antlr.version>2.7.7</antlr.version>
<aspectj.version>1.7.1</aspectj.version>
<commons-dbcp.version>1.4</commons-dbcp.version>
<commons-lang3.version>3.1</commons-lang3.version>
<commons-pool.version>1.6</commons-pool.version>
<ehcache.version>2.6.3</ehcache.version>
@ -126,8 +125,10 @@
<!-- DataSource -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<version>7.0.37</version>
<scope>runtime</scope>
</dependency>
<!--
<dependency>
@ -736,12 +737,6 @@
<!-- Apache Commons
-->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>

View file

@ -19,10 +19,11 @@
<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
<context:property-placeholder location="classpath:spring/jdbc.properties"/>
<!-- DataSource configuration for Apache Commons DBCP. -->
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
<!-- DataSource configuration for Tomcat JDBC -->
<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}"/>
p:username="${jdbc.username}" p:password="${jdbc.password}"
p:maxActive="8" p:initialSize="8"/>
<!-- JNDI DataSource for JEE environments -->
<!--