Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/backend/utils/DBCPConnectionProvider.java @ 8484:8c615d738e84
maxWait should be set independendly of validationQuery.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 28 Nov 2014 10:21:40 +0100 |
parents | 7dd39219bd68 |
children | 026f4c684ee5 |
comparison
equal
deleted
inserted
replaced
8483:2db7a949ff8b | 8484:8c615d738e84 |
---|---|
213 } | 213 } |
214 | 214 |
215 String validationQuery = props.getProperty("validationQuery"); | 215 String validationQuery = props.getProperty("validationQuery"); |
216 if (validationQuery != null) { | 216 if (validationQuery != null) { |
217 ds.setValidationQuery(validationQuery); | 217 ds.setValidationQuery(validationQuery); |
218 ds.setMaxWait(1000); //TODO: make it configurable | 218 } |
219 } | 219 |
220 ds.setMaxWait(1000); //TODO: make it configurable | |
221 | |
220 // The BasicDataSource has lazy initialization | 222 // The BasicDataSource has lazy initialization |
221 // borrowing a connection will start the DataSource | 223 // borrowing a connection will start the DataSource |
222 // and make sure it is configured correctly. | 224 // and make sure it is configured correctly. |
223 | 225 |
224 // Connection conn = ds.getConnection(); | 226 // Connection conn = ds.getConnection(); |