public void endNode(RunResultInfo info) throws FinderException, NamingException {

   //実行結果に対応するセッション情報を取得します。
   JobSessionJobLocal sessionJob = JobSessionJobUtil.getLocalHome().findByPrimaryKey(
   new JobSessionJobPK(info.getSessionId(), info.getJobId()));

(中略)

   //実行結果が終了の場合の処理
   if(info.getStatus() == RunStatusConstant.END) {

      if(sessionNode.getStatus().intValue() == StatusConstant.TYPE_RUNNING) {
      //ステータスが実行中であることを確認し、終了を設定します。
      sessionNode.setStatus(new Integer(StatusConstant.TYPE_END));
      //終了日時を設定します。
      sessionNode.setEnd_date(info.getTime());
   }
   else if(sessionNode.getStatus().intValue() == StatusConstant.TYPE_STOPPING) {
      //ステータスが停止処理中の場合、停止を設定
      sessionNode.setStatus(new Integer(StatusConstant.TYPE_STOP));
   }
   //バッチ処理プロセスのリターンコードを設定
   sessionNode.setEnd_value(new Integer(info.getEndValue()));
   //バッチ処理プロセスのメッセージを設定
   sessionNode.setMessage(info.getMessage() + info.getErrorMessage());

(後略)