C3P0兼容

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@666 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-09-07 01:11:51 +00:00
parent e27d001c00
commit bbac0cfdaf
3 changed files with 29 additions and 15 deletions
@@ -216,6 +216,14 @@ public class DruidDataSourceC3P0Adapter implements DataSource, DruidDataSourceC3
return getNumBusyConnections();
}
public int getMaxStatementsPerConnection() {
return dataSource.getMaxPoolPreparedStatementPerConnectionSize();
}
public void setMaxStatementsPerConnection(int maxStatementsPerConnection) {
dataSource.setMaxPoolPreparedStatementPerConnectionSize(maxStatementsPerConnection);
}
// /////////////////
@Override
@@ -245,7 +253,6 @@ public class DruidDataSourceC3P0Adapter implements DataSource, DruidDataSourceC3
// ///////////////
private int maxStatementsPerConnection;
private String overrideDefaultUser;
private String overrideDefaultPassword;
private int propertyCycle;
@@ -275,14 +282,6 @@ public class DruidDataSourceC3P0Adapter implements DataSource, DruidDataSourceC3
this.maxStatements = maxStatements;
}
public int getMaxStatementsPerConnection() {
return maxStatementsPerConnection;
}
public void setMaxStatementsPerConnection(int maxStatementsPerConnection) {
this.maxStatementsPerConnection = maxStatementsPerConnection;
}
public String getConnectionTesterClassName() {
return connectionTesterClassName;
}