Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Copyright
Dedication
Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Chapter 1: Batch and Spring
A History of Batch Processing
Batch Challenges
Why Do Batch Processing in Java?
Other Uses for Spring Batch
The Spring Batch Framework
Defining Jobs with Spring
Managing Jobs
Local and Remote Parallelization
Standardizing I/O
The Spring Batch Admin Project
And All the Features of Spring
How This Book Works
Summary
Chapter 2: Spring Batch 101
The Architecture of Batch
Examining Jobs and Steps
Job Execution
Parallelization
Batch Administration
Documentation
Project Setup
Obtaining Spring Batch
It's the Law: Hello, World!
Running Your Job
Exploring the JobRepository
Job Repository Configuration
The Job Repository Tables
Summary
Chapter 3: Sample Job
Understanding Agile Development
Capturing Requirements with User Stories
Capturing Design with Test-Driven Development
Using a Source-Control System
Working with a True Development Environment
Understanding the Requirements of the Statement Job
Designing a Batch Job
Job Description
Understanding the Data Model
Summary
Chapter 4: Understanding Jobs and Steps
Introducing a Job
Tracing a Job's Lifecycle
Configuring a Job
Basic Job Configuration
Job Inheritance
Job Parameters
Working with Job Listeners
ExecutionContext
Manipulating the ExecutionContext
Working with Steps
Chunk vs. Item Processing
Step Configuration
Understanding the Other Types of Tasklets
Step Flow
Item Error Handling
Summary
Chapter 5: Job Repository and Metadata
Configuring the Job Repository
Using an In-Memory Job Repository
Database
Using Job Metadata
The JobExplorer
The JobOperator
Summary
Chapter 6: Running a Job
Starting a Job
Job Execution
Spring Batch Job Runners
Third-Party Integration
Stopping a Job
The Natural End
Programmatic Ending
External Stoppage
Error Handling
Controlling Restart
Preventing a Job from Being Rerun
Configuring the Number of Restarts
Rerunning a Complete Step
Summary
Chapter 7: Readers
The ItemReader Interface
File Input
Flat Files
XML
Database Input
JDBC
Hibernate
JPA
Existing Services
Custom Input
Error Handling
Skipping Records
Logging Invalid Records
Dealing with No Input
Summary
Chapter 8: Item Processors
Introduction to ItemProcessors
Using Spring Batch's ItemProcessors
ValidatingItemProcessor
ItemProcessorAdapter
CompositeItemProcessor
Writing Your Own ItemProcessor
Filtering Items
Summary
Chapter 9: Item Writers
Introduction to ItemWriters
File-Based ItemWriters
FlatFileItemWriter
StaxEventItemWriter
Database-Based ItemWriters
JdbcBatchItemWriter
HibernateItemWriter
JpaItemWriter
Alternative Output Destination ItemWriters
ItemWriterAdapter
PropertyExtractingDelegatingItemWriter
JmsItemWriter
SimpleMailMessageItemWriter
Multipart ItemWriters
MultiResourceItemWriter
CompositeItemWriter
ClassifierCompositeItemWriter
Summary
Chapter 10: Sample Application
Reviewing the Statement Job
Setting Up a New Project
Importing Customer and Transaction Data
Creating the Customer Transaction Reader
Looking Ip Ids
Writing the Customer and Transaction Data
Downloading Current Stock Prices
Reading the Tickers
Writing the Stock File
Importing Current Stock Prices
Reading the Stock Price File
Writing Stock Prices to the Database
Calculating Pricing Tiers
Reading How Many Transactions the Customer Had
Calculating the Pricing Tier
Updating the Database with the Calculated Tier
Calculating Transaction Fees
Reading the Transactions
Saving Transaction Fees to the Database
Generating Monthly Statement
Reading the Statement Data
Writing the Statements
Summary
Chapter 11: Scaling and Tuning
Profiling Your Batch Process
A Tour of VisualVM
Profiling Spring Batch Applications
Scaling a Job
Multithreaded Steps
Parallel Steps
Remote Chunking
Partitioning
Summary
Chapter 12: Testing Batch Processes
Unit Tests with JUnit and Mockito
JUnit
Mock Objects
Mockito
Integration Tests with Spring Classes
General Integration Testing with Spring
Testing Spring Batch
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →