INT-1872 Allow Indefinite Socket Timeout

Previously, for single-use server sockets, and for client sockets
that have a collaborating inbound adapter, the socket timeout
was set to 10 seconds, with no way to set to infinity. The work
around was to set it to Integer.MAX_VALUE.

The intent was to avoid DoS attacks and mis-behaved clients, but
some users have expressed a desire to be able to set an infinite
timeout in both scenarios.

A future release may remove the 10 second default from the client
socket that has a collaborating inbound adapter, and default to
infinity. For this reason, that case now emits a warning.

The default 10 second timeout on single-use server sockets will
likely remain.

INT-1872 Remove WARN Log

We decided to eliminate the log message regarding a possible
future change to the default timeout for client sockets used
for request/reply.
This commit is contained in:
Gary Russell
2011-10-14 22:39:33 -04:00
committed by Mark Fisher
parent 8dcf09f834
commit 57121604d3
6 changed files with 19 additions and 14 deletions

View File

@@ -725,12 +725,7 @@
factory.
</para>
<para>
It is not currently possible to set this to an infinite value
(0); the maximum value can be set using a SpEL expression as
follows.
<programlisting>
so-timeout="#{T(java.lang.Integer).MAX_VALUE}"
</programlisting>
Setting the attribute to 0 will enable an infinite timeout.
</para>
</note>
</para>
@@ -867,7 +862,9 @@
<entry>Y</entry>
<entry></entry>
<entry>Defaults to 0 (infinity), except when the connection
factory is used by collaborating adapters, where it
factory is used by collaborating adapters, and for
server connection factories with single-use="true".
In those cases, it
defaults to the default reply timeout (10 seconds).
See the section about collaborating adapters above
and <classname>java.net.Socket. setSoTimeout()</classname>.