During last JavaOne, we held a Hands-on-Lab on JSR 352. JSR 352 is one of the new Java EE 7 APIs. The formal API is name is 'Batch Applications for the Java Platform' but it is often referred to as the 'Batch API'.
The goal of this Lab is twofold, introducing the Batch API to newcomers and then explaining some of the most advanced JSR 352 features. For that reason, the Lab has been divided in 5 exercices:
- Exercice 1 will introduce you the main concepts of JSR 352 such as Step, Job, JSL, etc.
- Exercice 2 will enhance the first exercise and introduce mutli-steps jobs combining Chunk step with a Batchlet step.
- Exercice 3 will cover checkpoint and the JobOperator interface which can be used to resume a failed job.
- Exercice 4 will build introduce you to listeners, a mechanism that can be used to intervene within the life-cycle of a batch job (e.g. to catch errors).
- Exercice 5 will introduce the concept of Job Partitioning, a more advanced feature of JSR 352.
This Lab has been developed and tested on GlassFish 4.1 but it should work on any Java EE 7 compatible application server (note that JSR 352 is part of the full platform). This Lab is now hosted on GitHub so to learn JSR 352, just clone the https://github.com/java-ee/BatchLab
repository and check the masterLab