git-svn-id: http://code.alibabatech.com/svn/druid/trunk@598 b9813039-fb51-4c41-a8b9-e21c2acb5095

This commit is contained in:
wenshao
2011-09-02 18:16:00 +00:00
parent 52e97c980e
commit 02c86fc3f2
@@ -629,12 +629,13 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
lock.lock();
try {
// 必须存在线程等待,才创建连接
if (lock.getWaitQueueLength(notEmpty) == 0) {
int waitThreadCount = lock.getWaitQueueLength(notEmpty);
if (waitThreadCount == 0) {
lowWater.await();
continue;
}
if (minIdle > 0 && poolingCount >= minIdle) {
if (minIdle > 0 && (poolingCount - waitThreadCount) >= minIdle) {
lowWater.await();
continue;
}