boolean pingConnectionPool(String tmpJMSResource) throws ResourceException { PoolInfo poolInfo = new PoolInfo(tmpJMSResource); return connectorRuntime.pingConnectionPool(poolInfo); }
/** * @inheritDoc */ public void execute(AdminCommandContext context) { final ActionReport report = context.getActionReport(); try { PoolInfo poolInfo = new PoolInfo(poolName, applicationName, moduleName); Set<String> validationTableNames = jdbcAdminService.getValidationTableNames(poolInfo); Properties extraProperties = new Properties(); extraProperties.put("validationTableNames", new ArrayList(validationTableNames)); report.setExtraProperties(extraProperties); } catch (Exception e) { report.setMessage("_get-validation-table-names failed : " + e.getMessage()); report.setActionExitCode(ActionReport.ExitCode.FAILURE); report.setFailureCause(e); return; } ActionReport.ExitCode ec = ActionReport.ExitCode.SUCCESS; report.setActionExitCode(ec); } }
public static PoolInfo getPoolInfo(ResourcePool resource){ if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){ Application application = (Application)resource.getParent().getParent(); return new PoolInfo(resource.getName(), application.getName()); }else if(resource.getParent() != null && resource.getParent().getParent() instanceof Module){ Module module = (Module)resource.getParent().getParent(); Application application = (Application)module.getParent(); return new PoolInfo(resource.getName(), application.getName(), module.getName()); }else{ return new PoolInfo(resource.getName()); } }