Uploaded image for project: 'BatchEE'
  1. BatchEE
  2. BATCHEE-57

StepListener.afterStep() should not be called in case of exceptions inside the step

    XMLWordPrintableJSON

    Details

      Description

      Note: This issue is somehow related to

      https://issues.apache.org/jira/browse/BATCHEE-56

      As we have some integration-tests running on different application-servers, we discovered some differences in the behavior of the jbatch-implementations concerning listeners in case of exceptions:

      If an exception occurs during step-processing (Batchlet- as well as Chunk-Steps), then in case of JBeret, the StepListener.afterStep() method is not called, while the JBatch RI included in GlassFish 4 as well as Apache BatchEE do call the method.

      This issue has already been discussed in the JBeret issue-tracker:

      https://github.com/jberet/jsr352/issues/25

      Following the logic of the ChunkListener.afterChunk() method, I think that the afterStep()-method should not be called in case of exceptions. So I think the BatchEE implementation should be adjusted here. Please refer to the JBeret issue linked above for more details.

      I think in case of exceptions, something like a StepListener.onError() method would be a good idea (instead of calling afterStep() ). I have opened a discussion on the jbatch public mailing list for enhancing the error-handling with listeners:

      https://java.net/projects/jbatch/lists/public/archive/2014-12/message/3

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mariok Mario Ködding
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: