Spring Batch in Action
Arnaud Cogoluegnes, Thierry Templier, Gary Gregory and Olivier Bazoud
  • October 2011
  • ISBN 9781935182955
  • 504 pages
  • printed in black & white

Clear, easy to read, and very thorough.

Rick Wagner, Red Hat

Spring Batch in Action is an in-depth guide to writing batch applications using Spring Batch. Written for developers who have basic knowledge of Java and the Spring lightweight container, the book provides both a best-practices approach to writing batch jobs and comprehensive coverage of the Spring Batch framework.

Table of Contents show full




about this book

about the cover illustration

Part 1 Background

1. Introducing Spring Batch

1.1. What are batch applications?

1.2. Meet Spring Batch

1.3. Introducing the case study

1.4. Reading and writing the product data

1.5. Decompressing the input file with a tasklet

1.6. Testing the batch process

1.7. Skipping incorrect lines instead of failing

1.8. Summary

2. Spring Batch concepts

2.1. The batch domain language

2.2. The Spring Batch infrastructure

2.3. Anatomy of a job

2.4. Summary

Part 2 Core Spring Batch

3. Batch configuration

3.1. The Spring Batch XML vocabulary

3.2. Configuring jobs and steps

3.3. Configuring the job repository

3.4. Advanced configuration topics

3.5. Summary

4. Running batch jobs

4.1. Launching concepts

4.2. Launching from the command line

4.3. Job schedulers

4.4. Launching from a web application

4.5. Stopping jobs gracefully

4.6. Summary

5. Reading data

5.1. Data reading concepts

5.2. Reading flat files

5.3. Reading XML files

5.4. Reading file sets

5.5. Reading from relational databases

5.6. Using other input sources

5.7. Implementing custom readers

5.8. Summary

6. Writing data

6.1. Data-writing concepts

6.2. Writing files

6.3. Writing to databases

6.4. Adapting existing services for reuse

6.5. Writing to JMS

6.6. Sending email messages

6.7. Implementing custom item writers

6.8. Advanced writing techniques

6.9. Summary

7. Processing data

7.1. Processing items

7.2. Transforming items

7.3. Filtering and validating items

7.4. Chaining item processors

7.5. Summary

8. Implementing bulletproof jobs

8.1. What is a bulletproof job?

8.2. Skipping instead of failing

8.3. Retrying on error

8.4. Restart on error

8.5. Summary

9. Transaction management

9.1. A transaction primer

9.2. Transaction management in Spring Batch components

9.3. Transaction configuration

9.4. Transaction management patterns

9.5. Summary

Part 3 Advanced Spring Batch

10. Controlling execution

10.1. A complex flow in the online store application

10.2. Driving the flow of a job

10.3. Sharing data between steps

10.4. Externalizing flow definitions

10.5. Stopping a job execution

10.6. Summary

11. Enterprise integration

11.1. What is enterprise integration?

11.2. Spring Batch and enterprise integration

11.3. Spring Integration, a toolbox for enterprise integration

11.4. RESTful job submission with Spring MVC

11.5. Triggering jobs from file system events

11.6. RESTful job monitoring with Spring MVC

11.7. Summary

12. Monitoring jobs

12.1. Introducing monitoring

12.2. Accessing batch execution data

12.3. Monitoring with listeners

12.4. Web monitoring with Spring Batch Admin

12.5. Monitoring with JMX

12.6. Summary

13. Scaling and parallel processing

13.1. Scaling concepts

13.2. Multithreaded steps

13.3. Parallelizing processing (single machine)

13.4. Remote chunking (multiple machines)

13.5. Fine-grained scaling with partitioning

13.6. Comparing patterns

13.7. Summary

14. Testing batch applications

14.1. The what and why of testing

14.2. Unit testing

14.3. Integration testing

14.4. Functional testing

14.5. Summary

Appendix A: Setting up the development environment

Appendix B: Managing Spring Batch Admin


© 2014 Manning Publications Co.

About the Technology

Even though running batch jobs is a common task, there's no standard way to write them. Spring Batch is a framework for writing batch applications in Java. It includes reusable components and a solid runtime environment, so you don't have to start a new project from scratch. And it uses Spring's familiar programming model to simplify configuration and implementation, so it'll be comfortably familiar to most Java developers.

About the book

Spring Batch in Action is a thorough, in-depth guide to writing efficient batch applications. Starting with the basics, it discusses the best practices of batch jobs along with details of the Spring Batch framework. You'll learn by working through dozens of practical, reusable examples in key areas like monitoring, tuning, enterprise integration, and automated testing.

No prior batch programming experience is required. Basic knowledge of Java and Spring is assumed.

What's inside

  • Batch programming from the ground up
  • Implementing data components
  • Handling errors during batch processing
  • Automating tedious tasks

About the reader

No prior batch programming experience is required. Basic knowledge of Java and Spring is assumed.

About the authors

Arnaud Cogoluegnes, Thierry Templier, and Olivier Bazoud are Java EE architects with a focus on Spring. Gary Gregory is a Java developer and software integration specialist.

combo $59.99 pBook + eBook
eBook $47.99 pdf + ePub + kindle

FREE domestic shipping on three or more pBooks

A must-have for enterprise batch programmers.

John Guthrie, SAP

A fresh look at using batch in the enterprise.

Tray Scates, Unisys Corporation

The definitive source.

C├ędric Exbrayat, Lyon Java User Group

Flawlessly written, easily readable, powerfully presented.

Willhelm Lehman, Websense Inc.