Java Reference
In-Depth Information
<job id="inscription-validator-Job"
version="1.0"xmlns="http://xmlns.jcp.org/xml/ns/
javaee">
<step id="validate-notify" >
<chunk>
<reader ref="InscriptionReader" />
<processor ref="InscriptionProcessor" />
<writer ref="StudentNotifier" />
</chunk>
</step>
</job>
Chunk
A chunk is a type of step that implements the Reader-Processor-Writer pattern. It
runs in the scope of a configurable transaction and can receive many configuration
values. The following code is a more enhanced version of the inscription-validator-
Job shown in the preceding code. In this listing, we have added a configuration to
define the unit element that will be used in order to manage the commit behavior of
the chunk ( checkpoint-policy="item" ), and a configuration to define the num-
ber of items (unit elements) to process before commit ( item-count="15" ). We
have also specified the number of exceptions a step will skip if any configured ex-
ceptions that can be skipped are thrown by the chunk ( skip-limit="30" ).
The following code is an example of a chunk type step with some configuration:
<job id="inscription-validator-Job"
version="1.0"
xmlns="http://xmlns.jcp.org/xml/ns/javaee">
<step id="validate-notify" >
<chunk item-count="15"
checkpoint-policy="item"
skip-limit="30">
<reader ref="InscriptionReader" />
<processor ref="InscriptionProcessor" />
<writer ref="StudentNotifier" />
</chunk>
Search WWH ::




Custom Search