兼容DBCP

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@498 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-07-21 09:26:47 +00:00
parent 916c0ffcaf
commit 2878c66ec2
6 changed files with 65 additions and 23 deletions
@@ -274,7 +274,10 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
if (isTestOnBorrow()) {
boolean validate = testConnectionInternal(poolalbeConnection.getConnection());
if (!validate) {
LOG.debug("skip not validate connection.");
if (LOG.isDebugEnabled()) {
LOG.debug("skip not validate connection.");
}
Connection realConnection = poolalbeConnection.getConnection();
JdbcUtils.close(realConnection);
continue;