增强监控

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@932 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-10-09 07:14:53 +00:00
parent 8f6bcf8207
commit eb70a31106
4 changed files with 24 additions and 4 deletions
@@ -47,6 +47,7 @@ public class PreparedStatementPool {
if (holder != null) {
holder.incrementReusedCount();
dataSource.decrementCachedPreparedStatementCount();
}
return holder;
@@ -57,6 +58,8 @@ public class PreparedStatementPool {
PreparedStatementHolder oldHolder = map.put(key, holder);
if (oldHolder != null) {
dataSource.closePreapredStatement(oldHolder);
} else {
dataSource.incrementCachedPreparedStatementCount();
}
}
@@ -77,6 +80,7 @@ public class PreparedStatementPool {
if (remove) {
dataSource.closePreapredStatement(eldest.getValue());
dataSource.decrementCachedPreparedStatementCount();
}
return remove;