>
> The connection manager has no way of knowing if a connection is still
> being used. No matter what it needs to be notified that the connection
> can be re-claimed (and either kept alive for further re-use or
> discarded). The #release method looks like a natural way of doing that.
>
> Oleg
>
Thanks - I'm still trying to grok, at a lower-level, the relationship
between the connection, the manager, and the pool. I've got past the
connection pool shutdown problem (my code). I'm now seeing ISE raised on
an unexpectedly closed HttpConnection (stack trace below). I'm not
getting this one, as the RequestExecutor is successfully sending the
request, but it's erring out on the closed connection.
Assuming that the connection is not shared across threads, and not being
closed by another thread, what would be a cause of the unexpected
connection close between the request and response?
Thanks for your help. My suspicion is that there is still someone holding
onto a connection, while in parallel, the connection manager from which
that connection was provisioned is shutdown. I'm wondering if there might
be another scenario.
Caused by: java.lang.IllegalStateException: Connection is not open
at org.apache.http.util.Asserts.check(Asserts.java:34)
at
org.apache.http.impl.BHttpConnectionBase.ensureOpen(BHttpConnectionBase.java:128)
at
org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseEntity(DefaultBHttpClientConnection.java:172)
at
org.apache.http.impl.conn.CPoolProxy.receiveResponseEntity(CPoolProxy.java:157)
at
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:254)
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at
org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at
org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)