Java Reference
In-Depth Information
JMS Queue
Database
ItemReader
ItemProcessor
ItemWriter
Read Message
Read Message
Read Message
Process Chunk
Results
Write
Figure 1-2. Batching JMS processing to increase throughput
As you can see, Spring Batch is a framework that, although designed for mainframe-like processing,
can be used to simplify a variety of development problems. With everything in mind about what batch is
and why you should use Spring Batch, let's finally begin looking at the framework itself.
The Spring Batch Framework
The Spring Batch framework (Spring Batch) was developed as a collaboration between Accenture and
SpringSource as a standards-based way to implement common batch patterns and paradigms.
Features implemented by Spring Batch include data validation, formatting of output, the ability to
implement complex business rules in a reusable way, and the ability to handle large data sets. You'll find
as you dig through the examples in this topic that if you're familiar at all with Spring, Spring Batch just
makes sense.
Let's start at the 30,000-foot view of the framework, as shown in Figure 1-3.
Application
Core
Infrastructure
Figure 1-3. The Spring Batch architecture
Spring Batch consists of three tiers assembled in a layered configuration. At the top is the
application layer , which consists of all the custom code and configuration used to build out your batch
processes. Your business logic, services, and so on, as well as the configuration of how you structure
your jobs, are all considered the application. Notice that the application layer doesn't sit on top of but
instead wraps the other two layers, core and infrastructure. The reason is that although most of what you
develop consists of the application layer working with the core layer, sometimes you write custom
infrastructure pieces such as custom readers and writers.
 
Search WWH ::




Custom Search