ping = Boolean.valueOf(((JdbcConnectionPool)pool).getPing());
}else if (pool instanceof ConnectorConnectionPool) {
ping = Boolean.valueOf(((ConnectorConnectionPool)pool).getPing());
}
if(ping){
PoolInfo poolInfo = ConnectorsUtil.getPoolInfo(pool);
CommandRunner commandRunner = habitat.getComponent(CommandRunner.class);
ActionReport report = habitat.getComponent(ActionReport.class);
CommandRunner.CommandInvocation invocation =
commandRunner.getCommandInvocation("ping-connection-pool", report);
ParameterMap params = new ParameterMap();
params.add("appname",poolInfo.getApplicationName());
params.add("modulename",poolInfo.getModuleName());
params.add("DEFAULT", poolInfo.getName());
invocation.parameters(params).execute();
if(report.getActionExitCode() == ActionReport.ExitCode.SUCCESS){
_logger.log(Level.INFO, "app-scoped.ping.connection.pool.success", poolInfo);
}else{
Object args[] = new Object[]{poolInfo, report.getFailureCause()};