]> source.dussan.org Git - archiva.git/commitdiff
[MRM-751]
authorMaria Odea B. Ching <oching@apache.org>
Fri, 20 Jun 2008 03:49:16 +0000 (03:49 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Fri, 20 Jun 2008 03:49:16 +0000 (03:49 +0000)
-configure jetty to use commons-dbcp for db connection pool

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@669774 13f79535-47bb-0310-9956-ffa450edef68

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

index deb0d0aff8bf5a56d6e111898a81ffd898cc7889..a655722d2f0afa1cd389104d1d46c5f96250b4ee 100644 (file)
         </exclusion>
       </exclusions>
     </dependency>
+    <dependency>
+      <groupId>commons-dbcp</groupId>
+      <artifactId>commons-dbcp</artifactId>
+      <version>1.2.1</version>
+      <exclusions>
+        <exclusion>
+          <groupId>xerces</groupId>
+          <artifactId>xercesImpl</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
index 439d808c317455d928e7f1d45e487130960d1112..5a106f08e30b6d245a1e6293f0c458d09c7e290b 100644 (file)
   </New>
 
   <!-- Archiva database -->
-   
   <New id="archiva" class="org.mortbay.jetty.plus.naming.Resource">
-    <Arg>jdbc/archiva</Arg>
-    <Arg>
-      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
-        <Set name="user">sa</Set>
-        <Set name="createDatabase">create</Set>
-      </New>
-    </Arg>
+      <Arg>jdbc/archiva</Arg>
+      <Arg>
+       <New class="org.apache.commons.dbcp.BasicDataSource">
+             <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDataSource</Set>
+             <Set name="url">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
+             <Set name="username">sa</Set>
+             <Call name="addConnectionProperty">
+               <Arg>create</Arg>
+               <Arg>true</Arg>
+             </Call>
+       </New>
+      </Arg>
   </New>
 
   <New id="archivaShutdown" class="org.mortbay.jetty.plus.naming.Resource">
     <Arg>jdbc/archivaShutdown</Arg>
     <Arg>
-      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
-        <Set name="user">sa</Set>
-        <Set name="shutdownDatabase">shutdown</Set>
-      </New>
+      <New class="org.apache.commons.dbcp.BasicDataSource">
+             <Set name="driverClassName">org.apache.derby.jdbc.EmbeddedDataSource</Set>
+             <Set name="url">jdbc:derby:<SystemProperty name="appserver.base" default=".."/>/data/databases/archiva</Set>
+             <Set name="username">sa</Set>
+              <Call name="addConnectionProperty">
+               <Arg>shutdown</Arg>
+               <Arg>true</Arg>
+             </Call>
+       </New>
     </Arg>
   </New>