Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain the differences about the possibles batch:listeners declaration locations [BATCH-2628] #977

Open
spring-issuemaster opened this issue Jun 29, 2017 · 0 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Jun 29, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.