Spring Batch - Reference Documentation

Authors

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
3.5.2.1. FieldSetMapper
3.5.2.2. LineTokenizer
3.5.2.3. Simple Delimited File Reading Example
3.5.2.4. Mapping fields by name
3.5.2.5. Automapping FieldSets to Domain Objects
3.5.2.6. Fixed Length file formats
3.5.2.7. Multiple record types within a single file
3.5.3. FlatFileItemWriter
3.5.3.1. LineAggregator
3.5.3.2. FieldSetCreator
3.5.3.3. Simple Delimited File Writing Example
3.5.3.4. 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
3.8.1.1. JdbcCursorItemReader
3.8.1.2. HibernateCursorItemReader
3.8.2. Driving Query Based ItemReaders
3.8.2.1. KeyCollector
3.8.2.2. SingleColumnJdbcKeyCollector
3.8.2.3. Mapping multiple column keys
3.8.2.4. 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.1.1.
3.10.2. Chaining ItemTransformers
3.11. Validating Input
3.11.1. The Delegate Pattern and Registering with the Step
3.11.1.1.
3.12. Creating Custom ItemReaders and ItemWriters
3.12.1. Custom ItemReader Example
3.12.1.1. Making the ItemReader transactional
3.12.1.2. Making the ItemReader restartable
3.12.2. Custom ItemWriter Example
3.12.2.1. Making the ItemReader transactional
3.12.2.2. 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
4.2.1.1. The CommandLineJobRunner
4.2.1.2. ExitCodes
4.3. Job Tier
4.3.1. SimpleJobLauncher
4.3.1.1. Stopping a Job
4.3.2. SimpleJobRepository
4.3.2.1. JobRepositoryFactoryBean
4.3.2.2. In-Memory Repository
4.3.3. SimpleJob
4.3.3.1. Restartability
4.3.3.2. Intercepting Job execution
4.3.4. JobFactory and Stateful Components in Steps
4.4. Application Tier
4.4.1. ItemOrientedStep
4.4.1.1. SimpleStepFactoryBean
4.4.1.2. Configuring a CommitInterval
4.4.1.3. Configuring a Step for Restart
4.4.1.4. Configuring Skip Logic
4.4.1.5. Configuring Retry Logic
4.4.1.6. Registering ItemStreams with the Step
4.4.1.7. Intercepting Step Execution
4.4.2. TaskletStep
4.4.2.1. TaskletAdapter
4.4.2.2. Example Tasklet implementation
4.5. Examples of Customized Business Logic
4.5.1.
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
6.2.2.1. 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.2. BATCH_JOB_INSTANCE
B.3. BATCH_JOB_PARAMS
B.4. BATCH_JOB_EXECUTION
B.5. BATCH_STEP_EXECUTION
B.6. BATCH_STEP_EXECUTION_CONTEXT
B.7. Archiving
Glossary