user clearDefines optimize Oracle PrepareStatement Cache memoery use

This commit is contained in:
wenshao
2011-12-29 23:04:03 +08:00
parent c54590db4a
commit 1352771e3f
9 changed files with 98 additions and 19 deletions
@@ -49,7 +49,7 @@ public class PreparedStatementPool {
PreparedStatementHolder holder = map.get(key);
if (holder != null) {
holder.incrementReusedCount();
holder.incrementHitCount();
dataSource.incrementCachedPreparedStatementHitCount();
} else {
dataSource.incrementCachedPreparedStatementMissCount();
@@ -70,7 +70,7 @@ public class PreparedStatementPool {
if (oldHolder != null) {
dataSource.closePreapredStatement(oldHolder);
} else {
if (holder.getReusedCount() == 0) {
if (holder.getHitCount() == 0) {
dataSource.incrementCachedPreparedStatementCount();
}
}