comparison 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
comparison
equal deleted inserted replaced
5192:1b6d4edeeb4c 5193:fb9dcc68b9c2
177 dbcpProperties.put( 177 dbcpProperties.put(
178 "maxOpenPreparedStatements", 178 "maxOpenPreparedStatements",
179 props.getProperty(DBCP_PS_MAXACTIVE)); 179 props.getProperty(DBCP_PS_MAXACTIVE));
180 } 180 }
181 181
182 String connectionInitSqls = props.getProperty("connectionInitSqls");
183 if (connectionInitSqls != null) {
184 dbcpProperties.put("connectionInitSqls", connectionInitSqls);
185 }
186
182 // Some debug info 187 // Some debug info
183 /* // commented out, because it leaks the password 188 /* // commented out, because it leaks the password
184 if (log.isDebugEnabled()) { 189 if (log.isDebugEnabled()) {
185 log.debug("Creating a DBCP BasicDataSource" + 190 log.debug("Creating a DBCP BasicDataSource" +
186 " with the following DBCP factory properties:"); 191 " with the following DBCP factory properties:");

http://dive4elements.wald.intevation.org