/** * Create an instance of {@link GetOperatingStatusResponseMessage } * */ public GetOperatingStatusResponseMessage createGetOperatingStatusResponseMessage() { return new GetOperatingStatusResponseMessage(); }
sb.append(url); sb.append("<br>Is Running?: "); sb.append(Boolean.toString(item.isStatus())); sb.append("<br>Status Message: "); sb.append(item.getStatusMessage()); sb.append("<br>Started at: "); if (item.getStartedAt() != null) { sb.append(Utility.formatDateTime(item.getStartedAt())); if (item.getVersionInfo()!=null){ sb.append("<br> Version: "); sb.append(item.getVersionInfo().getVersionData()); sb.append("<br>Version Source: "); sb.append(item.getVersionInfo().getVersionSource()); sb.append(Long.toString(item.getDataSentSuccessfully())); sb.append("<br>: Data Sent Failure: "); sb.append(Long.toString(item.getDataNotSentSuccessfully()));
AuditLogger.logItem(this.getClass().getCanonicalName(), "getOperatingStatus", currentUser, "", (request.getClassification()), ctx.getMessageContext()); GetOperatingStatusResponseMessage res = new GetOperatingStatusResponseMessage(); res.setClassification(request.getClassification()); res.setVersionInfo(new GetOperatingStatusResponseMessage.VersionInfo()); res.getVersionInfo().setVersionData(org.miloss.fgsms.common.Constants.Version); res.getVersionInfo().setVersionSource(org.miloss.fgsms.common.Constants.class.getCanonicalName()); res.setStartedAt(started); boolean ok = true; Connection con = Utility.getConfigurationDBConnection(); prepareStatement2.execute(); prepareStatement2.close(); res.setStatusMessage("OK"); } catch (Exception ex) { log.log(Level.WARN, null, ex); ok = false; res.setStatusMessage("One or more of the database connections is available"); } finally { DBUtils.safeClose(prepareStatement); DBUtils.safeClose(con); res.setStatus(ok); return res;
AuditLogger.logItem(this.getClass().getCanonicalName(), "getOperatingStatus", currentUser, "", (request.getClassification()), ctx.getMessageContext()); GetOperatingStatusResponseMessage res = new GetOperatingStatusResponseMessage(); res.setClassification(request.getClassification()); res.setVersionInfo(new GetOperatingStatusResponseMessage.VersionInfo()); res.getVersionInfo().setVersionData(org.miloss.fgsms.common.Constants.Version); res .getVersionInfo().setVersionSource(org.miloss.fgsms.common.Constants.class .getCanonicalName()); res.setDataSentSuccessfully(successTX); res.setDataNotSentSuccessfully(failuresTX); res.setStartedAt(started); boolean ok = true; Connection con = Utility.getConfigurationDBConnection(); prepareStatement2.execute(); res.setStatusMessage("OK"); } catch (Exception ex) { ok = false; res.setStatusMessage("One or more of the database connections is available"); } finally { DBUtils.safeClose(prepareStatement); res.setStatus(ok); successTX++; return res;
list.add(x); } catch (Exception ex) { GetOperatingStatusResponseMessage resr = new GetOperatingStatusResponseMessage(); resr.setStatus(false); resr.setStatusMessage("Unable to connect " + ex.getMessage()); OpStatWrapper x = new OpStatWrapper(); x.uri = urls.get(i);
AuditLogger.logItem(this.getClass().getCanonicalName(), "getOperatingStatus", currentUser, "", (request.getClassification()), ctx.getMessageContext()); GetOperatingStatusResponseMessage res = new GetOperatingStatusResponseMessage(); res.setClassification(request.getClassification()); res.setVersionInfo(new GetOperatingStatusResponseMessage.VersionInfo()); res.getVersionInfo().setVersionData(org.miloss.fgsms.common.Constants.Version); res.getVersionInfo().setVersionSource(org.miloss.fgsms.common.Constants.class.getCanonicalName()); res.setStartedAt(started); boolean ok = true; Connection con = Utility.getConfigurationDBConnection(); res.setStatusMessage("OK"); } catch (Exception ex) { ok = false; res.setStatusMessage("One or more of the database connections is available"); } finally { DBUtils.safeClose(prepareStatement); DBUtils.safeClose(con2); res.setStatus(ok); return res;
AuditLogger.logItem(this.getClass().getCanonicalName(), "getOperatingStatus", currentUser, "", (request.getClassification()), ctx.getMessageContext()); GetOperatingStatusResponseMessage res = new GetOperatingStatusResponseMessage(); res.setClassification(request.getClassification()); res.setVersionInfo(new VersionInfo()); res.getVersionInfo().setVersionData(org.miloss.fgsms.common.Constants.Version); res.getVersionInfo().setVersionSource(org.miloss.fgsms.common.Constants.class.getCanonicalName()); res.setStartedAt(started); boolean ok = true; Connection con = Utility.getConfigurationDBConnection(); prepareStatement2.execute(); res.setStatusMessage("OK"); } catch (Exception ex) { ok = false; res.setStatusMessage("One or more of the database connections is available"); } finally { DBUtils.safeClose(prepareStatement); DBUtils.safeClose(con); res.setStatus(ok); return res;
public static String ShowOpStat(SecurityWrapper c, org.miloss.fgsms.services.interfaces.status.OpStatusService ss, String url) { StringBuilder out = new StringBuilder(); String[] urls = url.split("|"); for (int i = 0; i < urls.length; i++) { try { BindingProvider bp = (BindingProvider) ss; bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, urls[i]); GetOperatingStatusRequestMessage req = new GetOperatingStatusRequestMessage(); req.setClassification(c); GetOperatingStatusResponseMessage res = ss.getOperatingStatus(req); if (res.isStatus()) { out.append("<h2>OK</h2>"); } else { out.append("<h2>BAD</h2>"); } out.append("Started at: ").append(res.getStartedAt().toString()).append("<br>"); out.append("Status Message:").append(Utility.encodeHTML(res.getStatusMessage())).append("<br>"); out.append("Version Data: ").append(Utility.encodeHTML(res.getVersionInfo().getVersionData())).append("<br>"); out.append("Version Source: ").append(Utility.encodeHTML(res.getVersionInfo().getVersionSource())).append("<br>"); out.append("Data Sent Failure: ").append(res.getDataNotSentSuccessfully()).append("<br>"); out.append("Data Sent Success: ").append(res.getDataSentSuccessfully()).append("<br>"); } catch (Exception ex) { out.append("Error caught checking stats on ").append(urls[i]).append(" ").append(ex.getMessage()); } } return out.toString(); }
AuditLogger.logItem(this.getClass().getCanonicalName(), "getOperatingStatus", currentUser, "", (request.getClassification()), ctx.getMessageContext()); GetOperatingStatusResponseMessage res = new GetOperatingStatusResponseMessage(); res.setClassification(request.getClassification()); res.setVersionInfo(new GetOperatingStatusResponseMessage.VersionInfo()); res.getVersionInfo().setVersionData(org.miloss.fgsms.common.Constants.Version); res .getVersionInfo().setVersionSource(org.miloss.fgsms.common.Constants.class .getCanonicalName()); res.setStartedAt(started); boolean ok = true; Connection con = Utility.getConfigurationDBConnection(); res.setStatusMessage("OK"); } catch (Exception ex) { ok = false; res.setStatusMessage("One or more of the database connections is available"); } finally { DBUtils.safeClose(prepareStatement); res.setStatus(ok); return res;