Java Reference
In-Depth Information
To build your artifacts, you use the standard mvn clean install command for the main jar file
because the batch profile has been configured to be active by default. To build the slave jar file, invoke
the listener profile using the mvn clean install -P listener command. In order for the listener profile
to work, however, you need to write the Geocoder class; see Listing 11-26.
Listing 11-26. Geocoder
package com.apress.springbatch.chapter11.main;
public class Geocoder {
* @param args
public static void main(String[] args) throws Exception {
new ClassPathXmlApplicationContext("/jobs/geocodeJob.xml");;
As you can see in Listing 11-26, all the Geocoder class does is load your context and block by calling . This keeps the application up and running until you decide to kill it. Because you can
build your two jar files at this point, let's look at what it takes to add remote chunking to the application.
Search WWH ::

Custom Search