From 69727ae8c4798eabdaceb34fb7b99f56acfba8c9 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Tue, 25 Nov 2008 18:09:11 +0000 Subject: [PATCH] GatewayProxyFactoryBean accepts non-PollableChannel for defaultReplyChannel. However, if a receive-only operation is performed (e.g. for a no-arg method), an IllegalStateException will be thrown when the receive attempt cannot proceed if the channel is not a PollableChannel. --- .../integration/gateway/GatewayProxyFactoryBean.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java b/org.springframework.integration/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java index 1af43694a7..78ab474794 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/gateway/GatewayProxyFactoryBean.java @@ -33,7 +33,6 @@ import org.springframework.beans.factory.BeanClassLoaderAware; import org.springframework.beans.factory.FactoryBean; import org.springframework.context.Lifecycle; import org.springframework.integration.annotation.Gateway; -import org.springframework.integration.channel.PollableChannel; import org.springframework.integration.core.Message; import org.springframework.integration.core.MessageChannel; import org.springframework.integration.endpoint.AbstractEndpoint; @@ -54,7 +53,7 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint implements Factory private volatile MessageChannel defaultRequestChannel; - private volatile PollableChannel defaultReplyChannel; + private volatile MessageChannel defaultReplyChannel; private volatile long defaultRequestTimeout = -1; @@ -98,7 +97,7 @@ public class GatewayProxyFactoryBean extends AbstractEndpoint implements Factory * @param replyChannel the channel from which reply messages will be * received if no reply channel has been configured with an annotation */ - public void setDefaultReplyChannel(PollableChannel defaultReplyChannel) { + public void setDefaultReplyChannel(MessageChannel defaultReplyChannel) { this.defaultReplyChannel = defaultReplyChannel; }