https://jira.springsource.org/browse/INT-3146 Incompatibility of using socket timeouts with a caching client connection factory. When a socket option timeout (soTimeout) is set on a TCP connection and the timeout occurs, the socket is closed. When a connection is intercepted, the close is performed through the interceptor (for example to allow a closing handshake before the physical close). However, the caching client connection factory is implemented using an interceptor, which returns the underlying connection to the cache pool (for reuse). In the case of a TcpNetConnection, the reader thread has terminated meaning that, the next time the connection is used, no reply will ever be received. The work-around (when using a gateway) is to use the 'remote-timeout' attribute instead of relying on the soTimeout. There is no work around when using collaborating channel adapters with a Net connection. Using NIO works because there is no reader thread in that case, but the socket is never closed on a timeout. Always physically close the connection whenever an exception occurs even if the close was delegated to an interceptor. Add test cases for Net and NIO implementations.
Spring Integration
Checking out and Building
To check out the project and build from source, do the following:
git clone git://github.com/SpringSource/spring-integration.git
cd spring-integration
./gradlew build
If you encounter out of memory errors during the build, increase available heap and permgen for Gradle:
GRADLE_OPTS='-XX:MaxPermSize=1024m -Xmx1024m'
To build and install jars into your local Maven cache:
./gradlew install
To build api Javadoc (results will be in build/api):
./gradlew api
To build reference documentation (results will be in build/reference):
./gradlew reference
To build complete distribution including -dist, -docs, and -schema zip files (results will be in build/distributions)
./gradlew dist
Using Eclipse
To generate Eclipse metadata (.classpath and .project files), do the following:
./gradlew eclipse
Once complete, you may then import the projects into Eclipse as usual:
File -> Import -> Existing projects into workspace
Browse to the 'spring-integration' root directory. All projects should import free of errors.
Using IntelliJ IDEA
To generate IDEA metadata (.iml and .ipr files), do the following:
./gradlew idea
Resources
For more information, please visit the Spring Integration website at: http://www.springsource.org/spring-integration