Java Reference
In-Depth Information
At this point, you can build and execute the job as you would any other job, and it works fine.
However, because you want to add remote chunking to this job, you need to make a couple of additions
to the project. As mentioned previously, you need to add dependencies to the POM file, write one more
Java class, and configure the pieces required for remote chunking.
To start, let's add the new dependencies to your POM file. These dependencies are for the Spring
Integration project ( www.springsource.org/spring-integration ); Sp ring Integration's JMS module; the
Spring Batch Integration subproject ( http://static.springsource.org/spring-batch/trunk/spr ing-
batch- integration/ ); the Apache HttpClient project ( http://hc.apache.org/httpcomponents-client-
ga/ ) to handle your web service calls; and ActiveMQ, which serves as the JMS implementation for this
job. Listing 11-24 shows the additional dependencies 3 added to the POM file.
Listing 11-24. Remote Chunking's Additional Dependencies
...
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
<version>${spring.integration.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-jms</artifactId>
<version>${spring.integration.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-integration</artifactId>
<version>${spring.batch-integration.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.1</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.4.2</version>
<exclusions>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activeio-core</artifactId>
</exclusion>
</exclusions>
</dependency>
...
3 For this example, you're using Spring 3.0.5.RELEASE, Spring Batch 2.1.7.RELEASE, Spring Batch
Integration 1.2.0.RELEASE, and Spring Integration 2.0.3.RELEASE.
Search WWH ::




Custom Search