Commit 040c9f37 authored by Matija Obreza's avatar Matija Obreza

Tomcat jdbc pool

parent e2fa402e
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
<hibernate.annotations.version>4.0.1.Final</hibernate.annotations.version> <hibernate.annotations.version>4.0.1.Final</hibernate.annotations.version>
<hsqldb.version>2.2.9</hsqldb.version> <hsqldb.version>2.2.9</hsqldb.version>
<ehcache.version>2.7.0</ehcache.version> <ehcache.version>2.7.0</ehcache.version>
<c3p0.version>0.9.2.1</c3p0.version>
<slf4j.version>1.7.5</slf4j.version> <slf4j.version>1.7.5</slf4j.version>
<log4j.version>1.2.17</log4j.version> <log4j.version>1.2.17</log4j.version>
...@@ -269,19 +268,6 @@ ...@@ -269,19 +268,6 @@
<version>${hibernate.annotations.version}</version> <version>${hibernate.annotations.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>${hibernate.version}</version>
<exclusions>
<!--We have newer version of c3p0 -->
<exclusion>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId> <artifactId>hibernate-entitymanager</artifactId>
...@@ -294,12 +280,6 @@ ...@@ -294,12 +280,6 @@
<version>${hsqldb.version}</version> <version>${hsqldb.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>${c3p0.version}</version>
</dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
...@@ -365,6 +345,11 @@ ...@@ -365,6 +345,11 @@
<artifactId>hibernate-search</artifactId> <artifactId>hibernate-search</artifactId>
<version>4.3.0.Final</version> <version>4.3.0.Final</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
<version>7.0.42</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<context:property-placeholder ignore-resource-not-found="true" location="classpath:/application.properties,classpath:/spring/spring.properties,classpath:/genesys.properties" /> <context:property-placeholder ignore-resource-not-found="true" location="classpath:/application.properties,classpath:/spring/spring.properties,classpath:/genesys.properties" />
<bean name="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <bean name="dataSource" class="org.apache.tomcat.jdbc.pool.DataSource">
<property name="url" value="${db.url}" /> <property name="url" value="${db.url}" />
<property name="driverClassName" value="${db.driverClassName}" /> <property name="driverClassName" value="${db.driverClassName}" />
<property name="username" value="${db.username}" /> <property name="username" value="${db.username}" />
...@@ -45,14 +45,6 @@ ...@@ -45,14 +45,6 @@
<property name="jpaProperties"> <property name="jpaProperties">
<props> <props>
<prop key="hibernate.hbm2ddl.auto">do-nothing</prop> <prop key="hibernate.hbm2ddl.auto">do-nothing</prop>
<prop key="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</prop>
<prop key="hibernate.connection.driver_class">${db.driverClassName}</prop>
<prop key="hibernate.connection.url">${db.url}</prop>
<prop key="hibernate.connection.username">${db.username}</prop>
<prop key="hibernate.connection.password">${db.password}</prop>
<prop key="hibernate.c3p0.maxPoolSize">${c3p0.maxPoolSize}</prop>
<prop key="hibernate.c3p0.minPoolSize">${c3p0.minPoolSize}</prop>
<prop key="hibernate.c3p0.acquireIncrement">${c3p0.acquireIncrement}</prop>
<prop key="hibernate.search.default.indexBase">${lucene.indexDir}</prop> <prop key="hibernate.search.default.indexBase">${lucene.indexDir}</prop>
</props> </props>
</property> </property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment