Author: olamy
Date: Mon Sep 24 16:12:25 2012
New Revision: 1389468

URL: http://svn.apache.org/viewvc?rev=1389468&view=rev
Log:
[MRM-1676] use tomcat-jdbc for connection pooling in embeded distrib.
for legacy webapp too.

Modified:
    archiva/trunk/archiva-jetty/pom.xml
    archiva/trunk/archiva-jetty/src/main/conf/jetty.xml

Modified: archiva/trunk/archiva-jetty/pom.xml
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-jetty/pom.xml?rev=1389468&r1=1389467&r2=1389468&view=diff
==============================================================================
--- archiva/trunk/archiva-jetty/pom.xml (original)
+++ archiva/trunk/archiva-jetty/pom.xml Mon Sep 24 16:12:25 2012
@@ -102,13 +102,8 @@
       <scope>runtime</scope>
     </dependency>
     <dependency>
-      <groupId>commons-dbcp</groupId>
-      <artifactId>commons-dbcp</artifactId>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>commons-pool</groupId>
-      <artifactId>commons-pool</artifactId>
+      <groupId>org.apache.tomcat</groupId>
+      <artifactId>tomcat-jdbc</artifactId>
       <scope>runtime</scope>
     </dependency>
   </dependencies>

Modified: archiva/trunk/archiva-jetty/src/main/conf/jetty.xml
URL: 
http://svn.apache.org/viewvc/archiva/trunk/archiva-jetty/src/main/conf/jetty.xml?rev=1389468&r1=1389467&r2=1389468&view=diff
==============================================================================
--- archiva/trunk/archiva-jetty/src/main/conf/jetty.xml (original)
+++ archiva/trunk/archiva-jetty/src/main/conf/jetty.xml Mon Sep 24 16:12:25 2012
@@ -314,7 +314,7 @@
   <New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
     <Arg>jdbc/users</Arg>
     <Arg>
-      <New class="org.apache.commons.dbcp.BasicDataSource">
+      <New class="org.apache.tomcat.jdbc.pool.DataSource">
         <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDriver</Set>
         <Set name="url">jdbc:derby:<SystemProperty name="appserver.base" 
default=".."/>/data/databases/users;create=true</Set>
         <Set name="username">sa</Set>
@@ -322,6 +322,9 @@
         <Set name="removeAbandoned">true</Set>
         <Set name="logAbandoned">true</Set>
         <Set name="initialSize">5</Set>
+        <Set name="testOnBorrow">true</Set>
+        <!-- very rigourous sql query validation -->
+        <Set name="validationQuery">select 1</Set>
       </New>
     </Arg>
   </New>
@@ -329,7 +332,7 @@
   <New id="usersShutdown" class="org.eclipse.jetty.plus.jndi.Resource">
     <Arg>jdbc/usersShutdown</Arg>
     <Arg>
-      <New class="org.apache.commons.dbcp.BasicDataSource">
+      <New class="org.apache.tomcat.jdbc.pool.DataSource">
         <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDriver</Set>
         <Set name="url">jdbc:derby:<SystemProperty name="appserver.base" 
default=".."/>/data/databases/users</Set>
         <Set name="username">sa</Set>


Reply via email to