diff flys-backend/src/main/java/de/intevation/flys/utils/DBCPConnectionProvider.java @ 5193:fb9dcc68b9c2

Possible fix for flys/1202. Initial SQL statements can now be issued at connection creation.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 07 Mar 2013 17:39:25 +0100
parents 0af4c8386ed0
children 42bb6ff78d1b
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/utils/DBCPConnectionProvider.java	Thu Mar 07 16:06:44 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/utils/DBCPConnectionProvider.java	Thu Mar 07 17:39:25 2013 +0100
@@ -179,6 +179,11 @@
                     props.getProperty(DBCP_PS_MAXACTIVE));
             }
 
+            String connectionInitSqls = props.getProperty("connectionInitSqls");
+            if (connectionInitSqls != null) {
+                dbcpProperties.put("connectionInitSqls", connectionInitSqls);
+            }
+
             // Some debug info
             /* // commented out, because it leaks the password
             if (log.isDebugEnabled()) {

http://dive4elements.wald.intevation.org