Skip to content

Spring Integration 2.1 to 2.2 Migration Guide

garyrussell edited this page May 23, 2012 · 29 revisions

###spring-integration-remote Session Interface

The interface is used by FTP and SFTP modules; in 2.2 a new method was added

String[] listNames(String path);

This method was introduced in 2.1.1 on a temporary sub-interface

ExtendedSession<F>

to avoid breaking any user implementations.

This interface has now been removed and the method moved to

Session<F>

Any user Session implementations must implement this method, to return a simple array of Strings, containing the file names matched to the path. This method is used by the mget command.

###TCP Default Socket Timeout

Previously, when using a client connection factory with both outbound and inbound adapters, sockets created by that factory would get a default socket timeout of 10 seconds. This could be overridden by specifying a large timeout (2.0) or 0 (2.1).

In 2.2 and above, these sockets now get a default timeout of 0 (infinity). If you wish to restore the previous behavior, explicitly set the so-timeout attribute to 10000.

Note that single-use sockets created by a server connection factory continue to be configured with the default of 10 seconds if the so-timeout attribute is not configured.

###TCP Thread Pools with NIO

Previously, it was possible to hit an irrecoverable deadlock when using fixed thread pools (executors) when using NIO connections. This was more likely to happen when the pool was very small (just a few threads) or under very extreme conditions.

With the 2.2. release, we have added deadlock detection which will cause a connection to eventually fail if a thread is not available to handle the request, rather than hanging indefinitely. This type of thread starvation was a rare occurrence; we only had one user experience it when he set the pool size to just 2.

However, by necessity, the deadlock detection logic causes extra threads to be used at times, and so may require users with fixed thread pools to slightly increase the pool size. Or, alternatively, use a cached thread pool, instead of a fixed thread pool.