]> source.dussan.org Git - archiva.git/commitdiff
use a database connection pooling from commons-dbcp for users database connection
authorOlivier Lamy <olamy@apache.org>
Tue, 22 May 2012 13:01:30 +0000 (13:01 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 22 May 2012 13:01:30 +0000 (13:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1341456 13f79535-47bb-0310-9956-ffa450edef68

archiva-jetty-js/src/main/conf/jetty.xml

index 91d2c091ed3a93f6f8e346d8b1d6b807ac0a7cda..407dfd4cd062367ab954a3c6faffe679ad522259 100644 (file)
   </New>
 
   <!-- Users / Security Database -->
-  
+  <!--
   <New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
     <Arg>jdbc/users</Arg>
     <Arg>
       </New>
     </Arg>
   </New>
+  -->
+  <New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
+    <Arg>jdbc/users</Arg>
+    <Arg>
+      <New class="org.apache.commons.dbcp.BasicDataSource">
+        <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>
+        <Set name="maxActive">20</Set>
+        <Set name="RemoveAbandoned">true</Set>
+        <Set name="LogAbandoned">true</Set>
+        <Set name="InitialSize">5</Set>
+      </New>
+    </Arg>
+  </New>
+
+  <New id="usersShutdown" class="org.eclipse.jetty.plus.jndi.Resource">
+    <Arg>jdbc/usersShutdown</Arg>
+    <Arg>
+      <New class="org.apache.commons.dbcp.BasicDataSource">
+        <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>
+      </New>
+    </Arg>
+  </New>
 </Configure>