img
. .
Figure 21-15. The job execution process
As you can see from Figure 21-15, Spring Batch will process each item on a chunk basis, which
includes the following steps:
Read in each item, and invoke Castor's marshaler to unmarshal the XML
1.
fragment into the corresponding Entry object.
The Entry object is then passed to the item processor, which will perform JSR-
2.
303 Beans Validation on the Entry object.
After the items within a chunk are processed, the writer will be invoked to write the processed
entries. In our case, the ItemWriterAdapter<T> class (under the package
org.springframework.batch.item.adapter) will be invoked to dedicate the writing process to the
SpringBlog's service layer for saving each entry.
Configuration Details
Having discussed the design details, let's proceed to the configuration of the SpringBlog application. In
the following sections, we will discuss the various configurations of the application, from web
deployment descriptor to Spring's WebApplicationContext hierarchy.
The Web Deployment Descriptor Configuration
Let's take a look on the web deployment descriptor (web.xml), which is shown in Listing 21-6.
Listing 21-6. The web.xml File
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Search WWH :
Custom Search
Previous Page
Spring Framework 3 Topic Index
Next Page
Spring Framework 3 Bookmarks
Home