use of com.pamirs.attach.plugin.dynamic.template.DbcpTemplate in project LinkAgent by shulieTech.
the class DataSourceWrapUtil method attachment.
public static void attachment(Advice advice) {
try {
BasicDataSource target = (BasicDataSource) advice.getTarget();
ResourceManager.set(new Attachment(target.getUrl(), "dbcp", Type.DataBaseType.types(), new DbcpTemplate().setUrl(target.getUrl()).setUsername(target.getUsername()).setPassword(target.getPassword()).setDriverClassName(target.getDriverClassName())));
} catch (Throwable t) {
logger.error(Throwables.getStackTraceAsString(t));
}
}
use of com.pamirs.attach.plugin.dynamic.template.DbcpTemplate in project LinkAgent by shulieTech.
the class DataSourceWrapUtil method attachment.
public static void attachment(Advice advice) {
try {
BasicDataSource target = (BasicDataSource) advice.getTarget();
ResourceManager.set(new Attachment(target.getUrl(), "dbcp2", Type.DataBaseType.types(), new DbcpTemplate().setUrl(target.getUrl()).setUsername(target.getUsername()).setPassword(target.getPassword()).setDriverClassName(target.getDriverClassName())));
} catch (Throwable t) {
logger.error(Throwables.getStackTraceAsString(t));
}
}
Aggregations