DruidDataSource支持Filter

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@52 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-05-13 08:51:40 +00:00
parent 4af8848041
commit d387694ee0
3 changed files with 105 additions and 4 deletions
@@ -90,6 +90,14 @@ public class DruidDataSource extends DruidDataAbstractSource implements DruidDat
if (inited) {
return;
}
if (maxActive <= 0) {
throw new IllegalArgumentException("illegal maxActive " + maxActive);
}
if (maxIdle <= 0 || maxIdle < minIdle) {
throw new IllegalArgumentException("illegal maxPoolSize");
}
if (this.driverClass != null) {
this.driverClass = driverClass.trim();
@@ -119,10 +127,6 @@ public class DruidDataSource extends DruidDataAbstractSource implements DruidDat
initConnectionFactory();
if (maxIdle <= 0 || maxIdle < minIdle) {
throw new IllegalArgumentException("illegal maxPoolSize");
}
int capacity = maxIdle + maxActive;
if (capacity < getInitialSize()) {