Uploaded image for project: 'JBeret'
  1. JBeret
  2. JBERET-122

Item not skipped after skippable exception in ItemWriter

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.0.Beta1
    • 1.0.2.Final
    • jberet-core
    • None

      When a skippable exception occurred in ItemWriter.writeItems(...), the item was not skipped. See related issue in javaee-sample project:

      https://github.com/javaee-samples/javaee7-samples/issues/281

      JBeret ChunkRunner class should be fixed to properly handle skip in ItemWriter:

      (1) if there is only one item in the outputList, then clear it (and therefore skip it);
      (2) else, we need to skip the one item that has caused skippable exception in ItemWriter, while still preserving other items in the same chunk or outputList. But there is no easy way to single it out, and the best option is just to rollback the current chunk and retry with item-count 1. During the subsequent retry, (1) will kick in.

            cfang@redhat.com Cheng Fang
            cfang@redhat.com Cheng Fang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: