Permalink
Browse files

add DataSource#setValidationQuery() to keep connection to mysql

  • Loading branch information...
1 parent 30f2b23 commit f5b8c7d8c2095ec2dff5e33ed942ca1694d4aa12 @baepiff baepiff committed May 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/java/voldemort/store/mysql/MysqlStorageConfiguration.java
@@ -40,7 +40,7 @@ public MysqlStorageConfiguration(VoldemortConfig config) {
ds.setUsername(config.getMysqlUsername());
ds.setPassword(config.getMysqlPassword());
ds.setDriverClassName("com.mysql.jdbc.Driver");
-
+ ds.setValidationQuery("select 1");
ds.setInitialSize(config.getMysqlDsInitialPoolSize());
ds.setPoolPreparedStatements(config.isMysqlDsPoolPreparedStatements());
ds.setMaxActive(config.getMysqlDsMaxActiveConnections());

0 comments on commit f5b8c7d

Please sign in to comment.