Search in sources :

Example 1 with ProxoolTemplate

use of com.pamirs.attach.plugin.dynamic.template.ProxoolTemplate in project LinkAgent by shulieTech.

the class DataSourceGetConnectionCutoffInterceptor method attachment.

void attachment(Advice advice) {
    try {
        ProxoolDataSource target = (ProxoolDataSource) advice.getTarget();
        ResourceManager.set(new Attachment(target.getDriverUrl(), "proxool", Type.DataBaseType.types(), new ProxoolTemplate().setUrl(target.getDriverUrl()).setUsername(target.getUser()).setPassword(target.getPassword()).setDriverClassName(target.getDriver()).setAlias(target.getAlias())));
    } catch (Throwable t) {
        logger.error(Throwables.getStackTraceAsString(t));
    }
}
Also used : ProxoolTemplate(com.pamirs.attach.plugin.dynamic.template.ProxoolTemplate) ProxoolDataSource(org.logicalcobwebs.proxool.ProxoolDataSource) Attachment(com.pamirs.attach.plugin.dynamic.Attachment)

Aggregations

Attachment (com.pamirs.attach.plugin.dynamic.Attachment)1 ProxoolTemplate (com.pamirs.attach.plugin.dynamic.template.ProxoolTemplate)1 ProxoolDataSource (org.logicalcobwebs.proxool.ProxoolDataSource)1