You are previewing Spring Batch in Action.

Spring Batch in Action

Cover of Spring Batch in Action by Arnaud Cogoluegnes... Published by Manning Publications
O'Reilly logo

Chapter 6. Writing data

This chapter covers

  • Introducing item-writing concepts
  • Writing to files, databases, and JMS
  • Sending emails
  • Implementing custom writers
  • Implementing advanced writers

In chapter 5, we learned how to read data with Spring Batch. In this chapter, we focus on another core feature of the batch process: writing.

Reading input items takes place at the beginning of a chunk-oriented step and writing items takes place at the end. In Spring Batch, a writer is responsible for data persistence.

We start by looking at data-writing concepts. We use our case study to illustrate how to write data into flat files, XML files, and relational databases using both JDBC and ORM (Object Relational Mapping). Spring Batch provides various ...

The best content for your career. Discover unlimited learning on demand for around $1/day.