Spring Batch - Reference Documentation


Dave Syer, Wayne Lund, Lucas Ward

Spring Batch 1.0

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

1. Spring Batch Introduction
1.1. Introduction
1.1.1. Background
1.1.2. Usage Scenarios
1.1.3. Spring Batch Architecture
2. The Domain Language of Batch
2.1. Introduction
2.2. Batch Application Style Interactions and Services
2.3. Job Stereotypes
2.3.1. Job
2.3.2. JobInstance
2.3.3. JobParameters
2.3.4. JobExecution
2.4. Step Stereotypes
2.4.1. Step
2.4.2. StepExecution
2.4.3. ExecutionContext
2.5. JobRepository
2.6. JobLauncher
2.7. JobLocator
2.8. Item Reader
2.9. Item Writer
2.10. Tasklet
3. ItemReaders and ItemWriters
3.1. Introduction
3.2. ItemReader
3.3. ItemWriter
3.4. ItemStream
3.5. Flat Files
3.5.1. The FieldSet
3.5.2. FlatFileItemReader FieldSetMapper LineTokenizer Simple Delimited File Reading Example Mapping fields by name Automapping FieldSets to Domain Objects Fixed Length file formats Multiple record types within a single file
3.5.3. FlatFileItemWriter LineAggregator FieldSetCreator Simple Delimited File Writing Example Handling file creation
3.6. XML Item Readers and Writers
3.6.1. StaxEventItemReader
3.6.2. StaxEventItemWriter
3.7. Creating File Names at Runtime
3.8. Database
3.8.1. Cursor Based ItemReaders JdbcCursorItemReader HibernateCursorItemReader
3.8.2. Driving Query Based ItemReaders KeyCollector SingleColumnJdbcKeyCollector Mapping multiple column keys iBatisKeyCollector
3.8.3. Database ItemWriters
3.9. Reusing Existing Services
3.10. Item Transforming
3.10.1. The Delegate Pattern and Registering with the Step
3.10.2. Chaining ItemTransformers
3.11. Validating Input
3.11.1. The Delegate Pattern and Registering with the Step
3.12. Creating Custom ItemReaders and ItemWriters
3.12.1. Custom ItemReader Example Making the ItemReader transactional Making the ItemReader restartable
3.12.2. Custom ItemWriter Example Making the ItemReader transactional Making the ItemWriter restartable
4. Configuring and Executing A Job
4.1. Introduction
4.2. Run Tier
4.2.1. Running Jobs from the Command Line The CommandLineJobRunner ExitCodes
4.3. Job Tier
4.3.1. SimpleJobLauncher Stopping a Job
4.3.2. SimpleJobRepository JobRepositoryFactoryBean In-Memory Repository
4.3.3. SimpleJob Restartability Intercepting Job execution
4.3.4. JobFactory and Stateful Components in Steps
4.4. Application Tier
4.4.1. ItemOrientedStep SimpleStepFactoryBean Configuring a CommitInterval Configuring a Step for Restart Configuring Skip Logic Configuring Retry Logic Registering ItemStreams with the Step Intercepting Step Execution
4.4.2. TaskletStep TaskletAdapter Example Tasklet implementation
4.5. Examples of Customized Business Logic
4.5.2. Logging Item Processing and Failures
4.5.3. Stopping a Job Manually for Business Reasons
4.5.4. Adding a Footer Record
5. Repeat
5.1. RepeatTemplate
5.1.1. RepeatContext
5.1.2. ExitStatus
5.2. Completion Policies
5.3. Exception Handling
5.4. Listeners
5.5. Parallel Processing
5.6. Declarative Iteration
6. Retry
6.1. RetryTemplate
6.1.1. RetryContext
6.2. Retry Policies
6.2.1. Stateless Retry
6.2.2. Stateful Retry Item processing and stateful retry
6.3. Backoff Policies
6.4. Listeners
6.5. Declarative Retry
7. Unit Testing
7.1. End To End Testing Batch Jobs
7.2. Extending Unit Test frameworks
A. List of ItemReaders
A.1. Item Readers
A.2. Item Writers
B. Meta-Data Schema
B.1. Overview
B.1.1. Version
B.1.2. Identity
B.7. Archiving