Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

CHAPTER 11: Batch Processing > Building a Batch-Reporting Facility

Building a Batch-Reporting Facility

As an example, we will build a batch-reporting facility that generates to-do reports and e-mails them to the user nightly. We will leverage a couple of services created in earlier chapters: EMailAuthenticatedService from Chapter 8 and ReportService from Chapter 10. Figure 11-1 shows is an overview of the nightly reporting process.

image

Figure 11-1. Nightly reporting process

The process starts with the NightlyReportJob. When the NightlyReportJob is invoked by Quartz, it immediately invokes the BatchService. The BatchService is the main control routine. It facilitates the interaction with other solution components. First, the BatchService retrieves all User objects that have an e-mail address. For each user, the BatchService retrieves the Todo objects. The BatchService then uses the ReportService to generate a PDF report. Finally, the BatchService uses the EmailAuthenticatedService to send the user an e-mail attachment of the report.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial