batchee-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ködding (JIRA) <>
Subject [jira] [Commented] (BATCHEE-57) StepListener.afterStep() should not be called in case of exceptions inside the step
Date Mon, 15 Dec 2014 08:57:13 GMT


Mario Ködding commented on BATCHEE-57:

After some clarification with Brent Douglas from the JBatch RI team, it turns out that the
spec actually does specify the behavior as implemented in BatchEE and JBatch RI:

bq. A step listener can receive control before and after a step runs, and also if an exception
is thrown during step processing. 

For details, see also Brent Douglas' answers at:

Thus, no changes are needed in the implementation of BatchEE. This issue can be closed.

> StepListener.afterStep() should not be called in case of exceptions inside the step
> -----------------------------------------------------------------------------------
>                 Key: BATCHEE-57
>                 URL:
>             Project: BatchEE
>          Issue Type: Bug
>          Components: jbatch-core
>    Affects Versions: 0.1-incubating, 0.2-incubating, 0.3-incubating
>            Reporter: Mario Ködding
>            Priority: Minor
>             Fix For: 0.1-incubating, 0.2-incubating, 0.3-incubating
> Note: This issue is somehow related to
> 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:
> 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:

This message was sent by Atlassian JIRA

View raw message