diff --git a/spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryFactoryBean.java b/spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryFactoryBean.java index 4901863b54..114843dd5e 100644 --- a/spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryFactoryBean.java +++ b/spring-integration-ip/src/main/java/org/springframework/integration/ip/config/TcpConnectionFactoryFactoryBean.java @@ -107,6 +107,8 @@ public class TcpConnectionFactoryFactoryBean extends AbstractFactoryBean + + + + The delay (in milliseconds) before retrying a read after the previous attempt + failed due to insufficient threads. Default 100. + Only applies when 'using-nio' is true. + + + diff --git a/spring-integration-ip/src/test/java/org/springframework/integration/ip/config/ParserUnitTests-context.xml b/spring-integration-ip/src/test/java/org/springframework/integration/ip/config/ParserUnitTests-context.xml index 4358085b06..e1d1a500af 100644 --- a/spring-integration-ip/src/test/java/org/springframework/integration/ip/config/ParserUnitTests-context.xml +++ b/spring-integration-ip/src/test/java/org/springframework/integration/ip/config/ParserUnitTests-context.xml @@ -158,6 +158,7 @@ host="localhost" lookup-host="false" apply-sequence="false" + read-delay="10000" /> - \ No newline at end of file + diff --git a/spring-integration-ip/src/test/java/org/springframework/integration/ip/config/ParserUnitTests.java b/spring-integration-ip/src/test/java/org/springframework/integration/ip/config/ParserUnitTests.java index c192623d19..81398e8be2 100644 --- a/spring-integration-ip/src/test/java/org/springframework/integration/ip/config/ParserUnitTests.java +++ b/spring-integration-ip/src/test/java/org/springframework/integration/ip/config/ParserUnitTests.java @@ -451,6 +451,7 @@ public class ParserUnitTests { assertEquals(125, tcpOutEndpoint.getPhase()); assertFalse((Boolean) TestUtils.getPropertyValue( TestUtils.getPropertyValue(cfC1, "mapper"), "applySequence")); + assertEquals(10000L, TestUtils.getPropertyValue(cfC1, "readDelay")); } @Test @@ -466,6 +467,7 @@ public class ParserUnitTests { assertEquals(126, tcpInboundGateway1.getPhase()); assertFalse((Boolean) TestUtils.getPropertyValue( TestUtils.getPropertyValue(cfS2, "mapper"), "applySequence")); + assertEquals(100L, TestUtils.getPropertyValue(cfS2, "readDelay")); } @Test diff --git a/spring-integration-ws/src/main/java/org/springframework/integration/ws/AbstractWebServiceOutboundGateway.java b/spring-integration-ws/src/main/java/org/springframework/integration/ws/AbstractWebServiceOutboundGateway.java index 1a5214a1ea..8f8fe63cca 100644 --- a/spring-integration-ws/src/main/java/org/springframework/integration/ws/AbstractWebServiceOutboundGateway.java +++ b/spring-integration-ws/src/main/java/org/springframework/integration/ws/AbstractWebServiceOutboundGateway.java @@ -116,7 +116,7 @@ public abstract class AbstractWebServiceOutboundGateway extends AbstractReplyPro * Specify whether the URI should be encoded after any uriVariables * are expanded and before sending the request. The default value is true. * @param encodeUri true if the URI should be encoded. - * @see org.springframework.web.util.UriComponentsBuilder. + * @see org.springframework.web.util.UriComponentsBuilder * @since 4.1 */ public void setEncodeUri(boolean encodeUri) { diff --git a/src/reference/docbook/ip.xml b/src/reference/docbook/ip.xml index e8f4984122..54be4c2e2a 100644 --- a/src/reference/docbook/ip.xml +++ b/src/reference/docbook/ip.xml @@ -1035,7 +1035,7 @@ pools for the IO and assembly operations. - The framework providers a + The framework provides a CompositeExecutor, which allows the configuration of two distinct executors; one for performing IO operations, and one for message assembly. In this environment, an IO thread can never @@ -1046,7 +1046,9 @@ AbortPolicy (ABORT when using <task>). When an IO cannot be completed, it is deferred for a short time and retried continually until it can be completed and an assembler - allocated. + allocated. By default, the delay is 100ms but it can be changed using the + readDelay property on the connection factory (read-delay + when configuring with the XML namespace). Example configuration of the composite executor is shown below. @@ -1482,6 +1484,15 @@ private CompositeExecutor compositeExecutor() { See + + read-delay + Y + Y + long > 0 + The delay (in milliseconds) before retrying a read after the previous attempt + failed due to insufficient threads. Default 100. + Only applies if using-nio is true. +