-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target:druid, Action:connectionpoolfull cannot take effect #58
Comments
Target:druid, Action:connectionpoolfull cannot take effectTarget:druid Initial diagnosis: the following location is added to the log, not printed, the code does not come in, and other Targets, such as dubbo and jvm, can take effect, indicating that the sandbox is mounted without problems.
} Version Information: How to use: public static DruidDataSource dataSourceOf(DruidDataSourceProperties properties) { |
Target:druid
Action:connectionpoolfull
现象:不能生效
初步诊断:如下位置加入日志,未打印,代码没进来,同时其他 Target,像 dubbo、jvm 都能生效,说明 sandbox 挂载没问题。
`
public class DruidDataSourceEnhancer extends BeforeEnhancer {
private static final Logger LOGGER = LoggerFactory.getLogger(DruidDataSourceEnhancer.class);
}
`
版本信息:
chaosblade-exec-jvm:v0.1.0;
druid-spring-boot-starter-1.0.2.3-RELEASE
druid:druid-1.1.3
使用方式:
`
DataSource xDataSource() {
return DataSourceConfigurationSupport.dataSourceOf(xDataSourceProperties());
}
public static DruidDataSource dataSourceOf(DruidDataSourceProperties properties) {
DruidDataSource dataSource = new DruidDataSource();
dataSource.setDriverClassName(properties.getDriverClassName());
dataSource.setUrl(properties.getUrl());
dataSource.setUsername(properties.getUsername());
dataSource.setPassword(properties.getPassword());
dataSource.setInitialSize(properties.getInitialSize());
dataSource.setMaxActive(properties.getMaxActive());
dataSource.setMinIdle(properties.getMinIdle());
dataSource.setMaxWait((long)properties.getMaxWait());
dataSource.setPoolPreparedStatements(properties.isPoolPreparedStatements());
dataSource.setMaxPoolPreparedStatementPerConnectionSize(properties.getMaxPoolPreparedStatementPerConnectionSize());
dataSource.setValidationQuery(properties.getValidationQuery());
dataSource.setValidationQueryTimeout(properties.getValidationQueryTimeout());
dataSource.setTestOnBorrow(properties.isTestOnBorrow());
dataSource.setTestOnReturn(properties.isTestOnReturn());
dataSource.setTestWhileIdle(properties.isTestWhileIdle());
dataSource.setTimeBetweenEvictionRunsMillis((long)properties.getTimeBetweenEvictionRunsMillis());
dataSource.setMinEvictableIdleTimeMillis((long)properties.getMinEvictableIdleTimeMillis());
dataSource.setMaxEvictableIdleTimeMillis((long)properties.getMaxEvictableIdleTimeMillis());
dataSource.setPhyTimeoutMillis((long)properties.getPhyTimeoutMillis());
dataSource.setRemoveAbandoned(properties.isRemoveAbandoned());
dataSource.setRemoveAbandonedTimeout(properties.getRemoveAbandonedTimeout());
dataSource.setConnectProperties(toProperties(properties.getConnectionProperties()));
dataSource.setDefaultAutoCommit(properties.isDefaultAutoCommit());
dataSource.setLogAbandoned(properties.isLogAbandoned());
dataSource.setProxyFilters(properties.getFilters());
return dataSource;
}
`
The text was updated successfully, but these errors were encountered: