C3P0Adapter

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@680 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-09-07 14:36:10 +00:00
parent 3e6ef27925
commit 0c5f133175
3 changed files with 55 additions and 51 deletions
@@ -113,7 +113,7 @@ public abstract class DruidAbstractDataSource implements DruidAbstractDataSource
private boolean testOnReturn = DEFAULT_TEST_ON_RETURN;
private boolean testWhileIdle = DEFAULT_WHILE_IDLE;
protected boolean poolPreparedStatements = false;
protected int maxPoolPreparedStatementPerConnectionSize = -1;
protected int maxPoolPreparedStatementPerConnectionSize = -1;
protected boolean inited = false;
@@ -166,6 +166,16 @@ public abstract class DruidAbstractDataSource implements DruidAbstractDataSource
protected Date createdTime;
protected int connectionErrorRetryAttempts = 30;
public int getConnectionErrorRetryAttempts() {
return connectionErrorRetryAttempts;
}
public void setConnectionErrorRetryAttempts(int connectionErrorRetryAttempts) {
this.connectionErrorRetryAttempts = connectionErrorRetryAttempts;
}
public long getDupCloseCount() {
return dupCloseCount.get();
}
@@ -269,7 +279,7 @@ public abstract class DruidAbstractDataSource implements DruidAbstractDataSource
public void setRemoveAbandonedTimeout(int removeAbandonedTimeout) {
this.removeAbandonedTimeoutMillis = removeAbandonedTimeout * 1000;
}
public void setRemoveAbandonedTimeoutMillis(int removeAbandonedTimeoutMillis) {
this.removeAbandonedTimeoutMillis = removeAbandonedTimeoutMillis;
}