mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
enhance management
This commit is contained in:
@@ -264,6 +264,8 @@ public class DruidDataSourceC3P0Adapter implements DataSource, DruidDataSourceC3
|
||||
}
|
||||
|
||||
public void setMaxStatementsPerConnection(int maxStatementsPerConnection) {
|
||||
dataSource.setPoolPreparedStatements(maxStatementsPerConnection > 0);
|
||||
|
||||
dataSource.setMaxPoolPreparedStatementPerConnectionSize(maxStatementsPerConnection);
|
||||
}
|
||||
|
||||
@@ -272,6 +274,8 @@ public class DruidDataSourceC3P0Adapter implements DataSource, DruidDataSourceC3
|
||||
}
|
||||
|
||||
public void setMaxStatements(int maxStatements) {
|
||||
dataSource.setPoolPreparedStatements(maxStatements > 0);
|
||||
|
||||
dataSource.setMaxOpenPreparedStatements(maxStatements);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user