spring-projects / spring-projects/spring-batch
Explain the differences about the possibles batch:listeners declaration locations [BATCH-2628]
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 2.5k
- Avg merge
- 6d 53m
- Merged PRs (30d)
- 3
Description
Manuel Jordan opened BATCH-2628 and commented
Currently either of the following works fine (Read A and B comments):
<batch:chunk reader="personFileItemReader" ...>
<batch:retryable-exception-classes>
...
</batch:retryable-exception-classes>
<batch:retry-listeners>
<batch:listener ref="..."/>
...
</batch:retry-listeners>
<batch:skippable-exception-classes>
<batch:include class="..."/>
</batch:skippable-exception-classes>
<!-- A (within chunk)-->
<batch:listeners>
<batch:listener ref="..."/>
</batch:listeners>
</batch:chunk>
and
<batch:chunk reader="personFileItemReader" ...>
<batch:retryable-exception-classes>
...
</batch:retryable-exception-classes>
<batch:retry-listeners>
<batch:listener ref="..."/>
...
</batch:retry-listeners>
<batch:skippable-exception-classes>
<batch:include class="..."/>
</batch:skippable-exception-classes>
</batch:chunk>
<!-- B (outer chunk)-->
<batch:listeners>
<batch:listener ref="..."/>
</batch:listeners>
Even more, is possible declare batch:listeners outer of batch:tasklet (not tested for execution)
Not sure if it is a bug, but is not clear through the current Spring Batch Reference Documentation if exists a difference if the batch:listeners component is declared in either of these possible and valid locations
Affects: 3.0.6, 3.0.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Spring Batch Reference Documentation and compare the documented batch:listeners locations shown in the issue: inside chunk, outside chunk, and outside tasklet. Check whether each location has different behavior or scope. Done means the documentation clearly explains the valid locations and their differences, or states that they are equivalent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100