if(jcd != null)
{
final AbandonedConfig ac = jcd.getConnectionPoolDescriptor().getAbandonedConfig();
if (ac.getRemoveAbandoned() && ac.getLogAbandoned()) {
final LoggerWrapperPrintWriter loggerPiggyBack;
loggerPiggyBack = new LoggerWrapperPrintWriter(log, Logger.ERROR);
dataSource.setLogWriter(loggerPiggyBack);
}
}
return dataSource;
}