We are using HttpComponentsHttpInvokerRequestExecutor with HttpClient v4.2.1 with PoolingClientConnectionManager. We notice in our live environment, that in case of an error, the connection is not gracefully released.
I have attached a TestCase. The first one consumes the entity at the end (by default there are callback handler registered, which releases the connection after consuming the entity). Otherwise explicitly releasing connection is also possible to fix the problem.
But currently the HttpComponentsHttpInvokerRequestExecutor does not consume the entity after an HTTP error (or releasing connection explicitly) so the connection is not released and not available for other requests.
Good catch! I've addressed this through using HttpComponents 4.2's PoolingClientConnectionManager and the HttpPost.releaseConnection() now, which also got introduced as late as HttpComponents 4.2. Since Spring 3.1 aims to be compatible with HttpComponents 4.0 and higher, we're calling the releaseConnection method reflectively there if available. Spring 3.2 requires HttpComponents 4.2, so it's more straightforward there.