batchee-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ködding (JIRA) <j...@apache.org>
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

    [ https://issues.apache.org/jira/browse/BATCHEE-57?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14246461#comment-14246461
] 

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: https://github.com/WASdev/standards.jsr352.jbatch/issues/21

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: https://issues.apache.org/jira/browse/BATCHEE-57
>             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
> 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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message