修正回收连接时判断maxActive的策略

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@393 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-07-13 02:32:04 +00:00
parent 736d0b3ce2
commit 6546a45dc2
3 changed files with 71 additions and 36 deletions
@@ -365,18 +365,18 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
}
// 第四步,检查是符合MaxIdle的设定
if (count >= maxIdle) {
lock.lock();
try {
JdbcUtils.close(conn);
destroyCount++;
closeCount++;
decrementActiveCount();
} finally {
lock.unlock();
}
return;
}
// if (count >= maxIdle) {
// lock.lock();
// try {
// JdbcUtils.close(conn);
// destroyCount++;
// closeCount++;
// decrementActiveCount();
// } finally {
// lock.unlock();
// }
// return;
// }
//
if (isTestOnReturn()) {