keeping the socket connection open in spring integration
<p>Spring integration has a way to keep the socket connection open by setting single-use="false". My client wants to keep the connection open and send multiple transactions on the same connection.</p>

<p>Here is the configuration that I plan to use:</p>

<pre><code>&lt;int-ip:tcp-connection-factory id="crLfServer"
        type="server"
        port="${availableServerSocket}"
        single-use="false"
        so-timeout="10000"
        using-nio="false" 
        serializer="connectionSerializeDeserialize"
        deserializer="connectionSerializeDeserialize"
        /&gt;

    &lt;bean id="connectionSerializeDeserialize" class="org.springframework.integration.ip.tcp.serializer.ByteArrayStxEtxSerializer"/&gt;
</code></pre>

<p>If I make single-use="false", is the connection open as long the client keep the connection open?  </p>

<p>If the client does not send data between the requests (for example second transaction is sent after 30 minutes), is the connection going to be closed in the server because there is no traffic after first request?</p>

<p>is there any configuration to be set to keep the connection open for long time?</p>

<p>Please help.</p>

<p>To Summarize, the following configuration works to read data:</p>

<pre><code>&lt;int-ip:tcp-connection-factory id="crLfServer"
        type="server"
        port="${availableServerSocket}"
        single-use="false"
        so-timeout="0"
        using-nio="false" 
        serializer="connectionSerializeDeserialize"
        deserializer="connectionSerializeDeserialize"
        /&gt;
</code></pre>