SpringSource/spring-integration — pull request #849 by garyrussell (2013-08-20 15:47:51+00:00)
Title: INT-3112 Fix OOM in SimplePool

The SimplePool maintains an 'allocated' set, for the sole reason
of preventing a "foreign" (non-managed) object being returned.

When a pool item is detected as stale, it is removed from the pool
but remains in the 'allocated' set.

Add a test to verify the allocated size is reduced when a stale
item is popped from the pool.

Add a FileTransferringMessageHandler test (where the problem was
discovered).

Fix a test in TCP to expect a close().

__cherry-pick to 2.2x__