SPR 4.0.0.RELEASE and SI 4.0.0.M2 Compatibility

Updates to make spring-batch-integration compatible with these releases.
This commit is contained in:
Gary Russell
2013-12-20 20:22:00 -05:00
committed by Michael Minella
parent e5afdf735e
commit 7954bbdf9d
6 changed files with 20 additions and 10 deletions

View File

@@ -35,8 +35,8 @@
<properties>
<maven.test.failure.ignore>false</maven.test.failure.ignore>
<spring.batch.version>2.2.4.BUILD-SNAPSHOT</spring.batch.version>
<spring.framework.version>4.0.0.BUILD-SNAPSHOT</spring.framework.version>
<spring.integration.version>4.0.0.BUILD-SNAPSHOT</spring.integration.version>
<spring.framework.version>4.0.0.RELEASE</spring.framework.version>
<spring.integration.version>4.0.0.M2</spring.integration.version>
<spring.retry.version>1.0.3.RELEASE</spring.retry.version>
</properties>
<profiles>
@@ -570,6 +570,11 @@
<artifactId>spring-beans</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>

View File

@@ -135,6 +135,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-messaging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
@@ -164,8 +168,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>

View File

@@ -18,11 +18,11 @@ package org.springframework.batch.integration.async;
import org.springframework.batch.core.StepExecution;
import org.springframework.batch.core.scope.context.StepContext;
import org.springframework.batch.core.scope.context.StepSynchronizationManager;
import org.springframework.integration.channel.ChannelInterceptor;
import org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter;
import org.springframework.integration.support.MessageBuilder;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.ChannelInterceptor;
import org.springframework.messaging.support.ChannelInterceptorAdapter;
/**
* A {@link ChannelInterceptor} that adds the current {@link StepExecution} (if

View File

@@ -217,7 +217,7 @@ public class ChunkMessageChannelItemWriter<T> extends StepExecutionListenerSuppo
* and we shouldn't be)
*/
private void getNextResult() throws AsynchronousFailureException {
Message<ChunkResponse> message = messagingGateway.receive(replyChannel);
Message<ChunkResponse> message = (Message<ChunkResponse>) messagingGateway.receive(replyChannel);
if (message != null) {
ChunkResponse payload = message.getPayload();
if (logger.isDebugEnabled()) {

View File

@@ -3,11 +3,11 @@ package org.springframework.batch.integration.chunk;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.integration.channel.ChannelInterceptor;
import org.springframework.integration.channel.interceptor.ChannelInterceptorAdapter;
import org.springframework.integration.core.MessageSource;
import org.springframework.messaging.Message;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.support.ChannelInterceptor;
import org.springframework.messaging.support.ChannelInterceptorAdapter;
import org.springframework.util.Assert;

View File

@@ -132,7 +132,8 @@ public class MessageChannelPartitionHandler implements PartitionHandler {
messagingGateway.send(request);
}
Message<Collection<StepExecution>> message = messagingGateway.receive(replyChannel);
@SuppressWarnings("unchecked")
Message<Collection<StepExecution>> message = (Message<Collection<StepExecution>>) messagingGateway.receive(replyChannel);
if (logger.isDebugEnabled()) {
logger.debug("Received replies: " + message);
}