コード例 #1
0
 @Override
 public Serializable checkpointInfo() throws Exception {
   NumbersCheckpointData _chkptData = new NumbersCheckpointData();
   _chkptData.setCount(readerIndex);
   stepCtx.getProperties().setProperty("checkpoint.index", Integer.toString(readerIndex));
   return _chkptData;
 }
コード例 #2
0
  public void open(Serializable cpd) throws NamingException {

    NumbersCheckpointData numbersCheckpointData = (NumbersCheckpointData) cpd;

    forcedFailCount = Integer.parseInt(forcedFailCountProp);

    InitialContext ctx = new InitialContext();
    dataSource = (DataSource) ctx.lookup(RetryConnectionHelper.jndiName);

    if (cpd != null) {
      forcedFailCount = 0;
      this.readerIndex = numbersCheckpointData.getCount();
      stepCtx.getProperties().setProperty("init.checkpoint", this.readerIndex + "");
    }
  }