Java Reference
In-Depth Information
C H A P T E R 10
Sample Application
Tutorials you find on the Internet in technology can be funny. Most of then rarely extend past a “Hello,
World!” level of complexity for any new concept. And although that may be great for a basic
understanding of a technology, you know that life is never as simple as a tutorial makes it out to be.
Because of this, in this chapter you look at a more real-world example of a Spring Batch job.
This chapter covers the following:
Reviewing the statement job : Before developing any new functionality, you review
the goals of the job to be developed, as outlined in Chapter 3.
Project setup : You create a brand-new Spring Batch project from Spring's
Job development: You walk through the entire development process for the
statement job outlined in Chapter 3.
Job testing: You develop a full set of tests for this job, including unit, integration,
and functional tests.
Let's get started by reviewing what the statement job you develop is required to do.
Reviewing the Statement Job
The job you develop in this chapter is for a mythical investment firm called Apress Investment
Company. Apress Investments has a large number of clients that trade stocks through the company via
individual trading accounts. At the end of each month, the clients are assessed a fee based on how many
trades they made over the course of a month (the more trades they make, the lower the fee is). The
related transaction fees are deducted from their account's current cash balance, and a statement is sent
out containing the current values of all their investments as well as the current cash balance of their
To accomplish these requirements, you create a job that consists of six steps as outlined in Figure
Import Customer
and Transaction
Retrieve Stock
Import Stock
Calculate Tiers
Figure 10-1. The flow for the statement job
Search WWH ::

Custom Search