use of com.pamirs.attach.plugin.dynamic.template.C3p0Template in project LinkAgent by shulieTech.
the class DataSourceGetConnectionArgsCutoffInterceptor method attachment.
void attachment(Advice advice) {
try {
ComboPooledDataSource target = (ComboPooledDataSource) advice.getTarget();
ResourceManager.set(new Attachment(target.getJdbcUrl(), "c3p0", Type.DataBaseType.types(), new C3p0Template().setUrl(target.getJdbcUrl()).setUsername(target.getUser()).setPassword(target.getPassword()).setDriverClassName(target.getDriverClass()).setInitialPoolSize(target.getInitialPoolSize()).setMaxIdleTime(target.getMaxIdleTime()).setMaxPoolSize(target.getMaxPoolSize())));
} catch (Throwable t) {
logger.error(t.getMessage());
}
}
use of com.pamirs.attach.plugin.dynamic.template.C3p0Template in project LinkAgent by shulieTech.
the class DataSourceGetConnectionCutoffInterceptor method attachment.
void attachment(Advice advice) {
try {
ComboPooledDataSource target = (ComboPooledDataSource) advice.getTarget();
ResourceManager.set(new Attachment(target.getJdbcUrl(), "c3p0", Type.DataBaseType.types(), new C3p0Template().setUrl(target.getJdbcUrl()).setUsername(target.getUser()).setPassword(target.getPassword()).setDriverClassName(target.getDriverClass()).setInitialPoolSize(target.getInitialPoolSize()).setMaxIdleTime(target.getMaxIdleTime()).setMaxPoolSize(target.getMaxPoolSize())));
} catch (Throwable t) {
logger.error(t.getMessage());
}
}
Aggregations