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

Item not skipped after skippable exception in ItemWriter

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: