Java Reference
In-Depth Information
processing, it is always important to know how many treatments have been can-
celed. How many have been registered successfully? How many have been ig-
As you can see, we have not finished identifying questions that batch processing can
raise, but we discover that this is already a great deal. Trying to build such a tool on
your own may not only complicate your application but also introduce new bugs.
Understanding the Batch API
The Batch Applications API for the Java Platform 1.0 was developed to provide a
solution to the different needs listed in the earlier bullet items. It targets both Java SE
and Java EE applications and requires at least the 6th Version of JVM.
The features offered by this API can be summarized as follows:
• It offers the Reader-Processor-Writer pattern natively and gives you the
ability to implement your own batch pattern. This allows you to choose the
best pattern depending on the case.
• It gives the possibility of defining the behavior (skip, retry, rollback, and so
on) of the batch processing for each type of error.
• It supports many step-level metrics such as: rollbackCount ,
readSkipCount , writeSkipCount , and so on for monitoring.
• It can be configured to run some processes in parallel and offer the possibility
to use JTA or RESOURCE_LOCAL transaction mode.
To do this, the Batch Applications API for the Java Platform 1.0 is based on a solid
architecture that can be outlined by the following diagram. A Job is managed by a
JobOperator and has one or many steps, which can be either chunk or batchlet .
During its lifecycle, information (metadata) about a job is stored in JobRepository ,
as shown in the following diagram:
Search WWH ::

Custom Search