Ejemplo n.º 1
0
  /**
   * 이메일을 전송한다.
   *
   * @param mntrngLog 모니터링 대상정보
   * @return
   */
  private void sendEmail(DbMntrngLogVO mntrngLog) {
    String subject = null;
    String text = null;
    String errorContents = null;

    SimpleMailMessage msg = new SimpleMailMessage(this.mntrngMessage);
    // 수신자
    msg.setTo(mntrngLog.getMngrEmailAddr());
    // 메일제목
    subject = msg.getSubject();
    subject = StringUtil.replace(subject, "{모니터링종류}", "DB서비스모니터링");
    msg.setSubject(subject);
    // 메일내용
    text = msg.getText();
    text = StringUtil.replace(text, "{모니터링종류}", "DB서비스모니터링");
    errorContents = "데이타소스명 : " + mntrngLog.getDataSourcNm() + "\n";
    errorContents = errorContents + "서버명  : " + mntrngLog.getServerNm() + "\n";
    errorContents = errorContents + "DBMS종류 : " + mntrngLog.getDbmsKindNm() + "\n";
    errorContents = errorContents + "체크SQL : " + mntrngLog.getCeckSql() + "\n";
    errorContents = errorContents + "상태 : " + mntrngLog.getMntrngSttusNm() + "\n";
    errorContents = errorContents + "모니터링시각 : " + mntrngLog.getCreatDt() + "\n";
    errorContents = errorContents + "에러메시지 : " + mntrngLog.getLogInfo() + "\n";
    text = StringUtil.replace(text, "{에러내용}", errorContents);
    msg.setText(text);

    //		this.mntrngMailSender.send(msg);
  }
Ejemplo n.º 2
0
  /**
   * 기념일정보를 일괄등록처리한다.
   *
   * @param annvrsryManageVO
   * @param checkedAnnvrsryManageForInsert
   */
  public void insertAnnvrsryManageBnde(
      AnnvrsryManageVO annvrsryManageVO, String checkedAnnvrsryManageForInsert) {
    AnnvrsryManageVO annvrsryManage;

    String[] annvrsryManageValues = checkedAnnvrsryManageForInsert.split("[$]");
    String[] sTempAnnvrsryManage;
    String sTemp = null;

    if (checkedAnnvrsryManageForInsert != null && !checkedAnnvrsryManageForInsert.equals("")) {
      for (int i = 0; i < annvrsryManageValues.length; i++) {
        annvrsryManage = new AnnvrsryManageVO();
        sTemp = annvrsryManageValues[i];
        sTempAnnvrsryManage = sTemp.split(",");
        annvrsryManage.setUsid(sTempAnnvrsryManage[0]);

        annvrsryManage.setAnnvrsryDe(StringUtil.removeMinusChar(sTempAnnvrsryManage[1]));
        annvrsryManage.setCldrSe(sTempAnnvrsryManage[2]);
        annvrsryManage.setAnnvrsrySe(sTempAnnvrsryManage[3]);
        annvrsryManage.setAnnvrsryNm(sTempAnnvrsryManage[4]);
        if ("Y".equals(sTempAnnvrsryManage[5])) annvrsryManage.setReptitSe("1");
        annvrsryManage.setAnnvrsryBeginDe("7");
        annvrsryManage.setAnnvrsrySetup("Y");
        annvrsryManage.setMemo("기념일 일괄등록");

        try {
          annvrsryManage.setAnnId(annvrsryManageIdGnrService.getNextStringId());
        } catch (FdlException e) {
          throw new RuntimeException(e);
        }

        annvrsryManage.setFrstRegisterId(annvrsryManageVO.getFrstRegisterId());
        annvrsryManageMapper.insertAnnvrsryManage(annvrsryManage);
      }
    }
  }