INT-2262 - Add reply-timeout to Outbound Gateways

For reference see: https://jira.springsource.org/browse/INT-2262

Add reply-timeout attribute to:

* Amqp Outbound Gateway
* File Outbound Gateway
* Ftp Outbound Gateway
* Sftp Outbound Gateway
* Ws Outbound Gateway

Update Schema Documentation for reply-timeout attribute:

* spring-integration-jpa-2.2.xsd
* spring-integration-jms-2.2.xsd
* spring-integration-jdbc-2.2.xsd
* spring-integration-ip-2.2.xsd
* spring-integration-http-2.2.xsd

Update the *What's new in Spring Integration 2.2* section in the reference manual

INT-2262 - Code Review

* Update copyright year for affected files
* Update author tags for affected files
This commit is contained in:
Gunnar Hillert
2012-07-11 15:58:50 -04:00
committed by Gary Russell
parent 386be70dda
commit b07abcd30c
26 changed files with 374 additions and 117 deletions

View File

@@ -48,6 +48,7 @@ import static org.junit.Assert.assertNull;
/**
* @author Mark Fisher
* @author Oleg Zhurakousky
* @author Gunnar Hillert
*/
public class WebServiceOutboundGatewayParserTests {
@@ -71,6 +72,9 @@ public class WebServiceOutboundGatewayParserTests {
assertEquals(1, replyHeaders.size());
assertTrue(requestHeaders.contains("testRequest"));
assertTrue(replyHeaders.contains("testReply"));
Long sendTimeout = TestUtils.getPropertyValue(gateway, "messagingTemplate.sendTimeout", Long.class);
assertEquals(Long.valueOf(777), sendTimeout);
}
@Test
@@ -179,7 +183,7 @@ public class WebServiceOutboundGatewayParserTests {
assertEquals(resolver, accessor.getPropertyValue("faultMessageResolver"));
}
@Test
public void simpleGatewayWithCustomMessageSender() {
ApplicationContext context = new ClassPathXmlApplicationContext(
@@ -188,7 +192,7 @@ public class WebServiceOutboundGatewayParserTests {
assertEquals(EventDrivenConsumer.class, endpoint.getClass());
Object gateway = new DirectFieldAccessor(endpoint).getPropertyValue("handler");
assertEquals(SimpleWebServiceOutboundGateway.class, gateway.getClass());
DirectFieldAccessor accessor = new DirectFieldAccessor(gateway);
DirectFieldAccessor accessor = new DirectFieldAccessor(gateway);
accessor = new DirectFieldAccessor(accessor.getPropertyValue("webServiceTemplate"));
WebServiceMessageSender messageSender = (WebServiceMessageSender) context.getBean("messageSender");
assertEquals(messageSender, ((WebServiceMessageSender[])accessor.getPropertyValue("messageSenders"))[0]);
@@ -217,7 +221,7 @@ public class WebServiceOutboundGatewayParserTests {
assertEquals(EventDrivenConsumer.class, endpoint.getClass());
Object gateway = new DirectFieldAccessor(endpoint).getPropertyValue("handler");
assertEquals(SimpleWebServiceOutboundGateway.class, gateway.getClass());
DirectFieldAccessor accessor = new DirectFieldAccessor(gateway);
DirectFieldAccessor accessor = new DirectFieldAccessor(gateway);
accessor = new DirectFieldAccessor(accessor.getPropertyValue("webServiceTemplate"));
ClientInterceptor interceptor = context.getBean("interceptor", ClientInterceptor.class);
assertEquals(interceptor, ((ClientInterceptor[]) accessor.getPropertyValue("interceptors"))[0]);
@@ -318,7 +322,7 @@ public class WebServiceOutboundGatewayParserTests {
Marshaller marshaller = (Marshaller) context.getBean("marshallerAndUnmarshaller");
assertEquals(marshaller, TestUtils.getPropertyValue(gateway, "marshaller", Marshaller.class));
assertEquals(marshaller, TestUtils.getPropertyValue(gateway, "unmarshaller", Unmarshaller.class));
WebServiceMessageFactory messageFactory = (WebServiceMessageFactory) context.getBean("messageFactory");
assertEquals(messageFactory, TestUtils.getPropertyValue(gateway, "webServiceTemplate.messageFactory"));
}
@@ -330,7 +334,7 @@ public class WebServiceOutboundGatewayParserTests {
AbstractEndpoint endpoint = (AbstractEndpoint) context.getBean("gatewayWithSeparateMarshallerAndUnmarshallerAndMessageFactory");
assertEquals(EventDrivenConsumer.class, endpoint.getClass());
MarshallingWebServiceOutboundGateway gateway = (MarshallingWebServiceOutboundGateway) new DirectFieldAccessor(endpoint).getPropertyValue("handler");
Marshaller marshaller = (Marshaller) context.getBean("marshaller");
Unmarshaller unmarshaller = (Unmarshaller) context.getBean("unmarshaller");
assertEquals(marshaller, TestUtils.getPropertyValue(gateway, "marshaller", Marshaller.class));
@@ -365,5 +369,5 @@ public class WebServiceOutboundGatewayParserTests {
public void invalidGatewayWithNeitherUriNorDestinationProvider() {
new ClassPathXmlApplicationContext("invalidGatewayWithNeitherUriNorDestinationProvider.xml", this.getClass());
}
}

View File

@@ -10,7 +10,7 @@
http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/ws
http://www.springframework.org/schema/integration/ws/spring-integration-ws.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd">
<si:channel id="inputChannel"/>
@@ -27,6 +27,7 @@
request-channel="inputChannel"
uri="http://example.org"
reply-channel="outputChannel"
reply-timeout="777"
mapped-request-headers="testRequest"
mapped-reply-headers="testReply"/>
@@ -64,12 +65,12 @@
request-channel="inputChannel"
uri="http://example.org"
fault-message-resolver="faultMessageResolver"/>
<ws:outbound-gateway id="gatewayWithCustomMessageSender"
request-channel="inputChannel"
uri="http://example.org"
message-sender="messageSender"/>
<ws:outbound-gateway id="gatewayWithCustomMessageSenderList"
request-channel="inputChannel"
uri="http://example.org"
@@ -79,12 +80,12 @@
request-channel="inputChannel"
uri="http://example.org"
interceptor="interceptor"/>
<ws:outbound-gateway id="gatewayWithCustomInterceptorList"
request-channel="inputChannel"
uri="http://example.org"
interceptors="interceptors"/>
<ws:outbound-gateway id="gatewayWithPoller"
request-channel="pollableInputChannel"
uri="http://example.org">