diff artifact-database/src/main/java/de/intevation/artifactdatabase/DBConnection.java @ 38:93edc04f3a10

Added postgresql support. artifacts/trunk@104 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 18 Sep 2009 09:34:14 +0000
parents 1259d192e3c3
children 0f48188a6e02
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/DBConnection.java	Wed Sep 16 12:43:03 2009 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/DBConnection.java	Fri Sep 18 09:34:14 2009 +0000
@@ -8,19 +8,23 @@
 
 import java.io.File;
 
+import org.apache.log4j.Logger;
+
 /**
  *  @author Sascha L. Teichmann
  */
 public class DBConnection
 {
+    private static Logger logger = Logger.getLogger(DBConnection.class);
+
     public static final String DB_DRIVER =
-        "/artifacts-database/database/driver/text()";
+        "/artifact-database/database/driver/text()";
     public static final String DB_URL =
-        "/artifacts-database/database/url/text()";
+        "/artifact-database/database/url/text()";
     public static final String DB_USER =
-        "/artifacts-database/database/user/text()";
+        "/artifact-database/database/user/text()";
     public static final String DB_PASSWORD =
-        "/artifacts-database/database/password/text()";
+        "/artifact-database/database/password/text()";
 
     public static final String DEFAULT_DRIVER =
         "org.h2.Driver";
@@ -75,6 +79,9 @@
             String password = Config.getStringXPath(
                 DB_PASSWORD, DEFAULT_PASSWORD);
 
+            logger.info("database driver: " + driver);
+            logger.info("database url: " + url);
+
             dataSource.setDriverClassName(driver);
             dataSource.setUsername(user);
             dataSource.setPassword(password);

http://dive4elements.wald.intevation.org