diff artifact-database/src/main/java/de/intevation/artifactdatabase/db/DBConnection.java @ 337:6d239c58c636

Fixed flys/issue255 artifacts/trunk@2907 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 07 Oct 2011 15:32:58 +0000
parents 86dd32b45d87
children
line wrap: on
line diff
--- a/artifact-database/src/main/java/de/intevation/artifactdatabase/db/DBConnection.java	Fri Sep 23 08:42:17 2011 +0000
+++ b/artifact-database/src/main/java/de/intevation/artifactdatabase/db/DBConnection.java	Fri Oct 07 15:32:58 2011 +0000
@@ -96,7 +96,9 @@
             }
 
             try {
-                Class.forName(driver);
+                synchronized (DBConnection.class) {
+                    Class.forName(driver);
+                }
             }
             catch (ClassNotFoundException cnfe) {
                 log.error("cannot load driver", cnfe);

http://dive4elements.wald.intevation.org