support dynamic config

This commit is contained in:
wenshao
2012-08-17 08:22:19 +08:00
parent 773c2e63eb
commit dc7d7062b0
4 changed files with 40 additions and 39 deletions
@@ -253,10 +253,6 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
return;
}
if (maxActive < this.minIdle) {
throw new IllegalArgumentException("maxActive less than minIdle, " + maxActive + " < " + this.minIdle);
}
if (maxActive == 0) {
throw new IllegalArgumentException("maxActive can't not set zero");
}
@@ -265,6 +261,10 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
this.maxActive = maxActive;
return;
}
if (maxActive < this.minIdle) {
throw new IllegalArgumentException("maxActive less than minIdle, " + maxActive + " < " + this.minIdle);
}
if (LOG.isInfoEnabled()) {
LOG.info("maxActive modified : " + this.maxActive + " -> " + maxActive);