Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In the SpringBlog application, we will adopt Spring Batch and Spring Integration to implement the job of importing blog posting entries from an XML file.
The mechanism discussed in this chapter will be used in developing the batch job. First, the XML file format for blog posting will be defined, together with the corresponding Castor mapping definitions.
Second, Spring Integration's file polling support will be used for scanning the arrival of a file containing new blog postings. When a new file arrives, the inbound channel adapter will pick up the file, and then the file message will be output to the file's channel.
The same transformer developed in this chapter will be used to transform the file message into the job launch request message, and outputting it to the requests channel.