Hi Mark,

By default HttpClient makes use of the SimpleHttpConnectionManager. This connection manager only supports one request at a time. Each request, including the response, must be fully complete before the next begins. Sounds like the MultiThreadedHttpConnectionManager might be more appropriate for you <http://jakarta.apache.org/commons/httpclient/threading.html>.

Mike

Mark R. Diggory wrote:
I have an instance of HttpClient which I think I'm experiencing a race condition with.

I make one GetMethod request to a resource, as I'm parsing the InputStream into xml, I'm also making secondary GetMethod requests to URI's that reside on the same host. During each secondary request, I properly close the InputStream and call method.releaseConnection() to return the connection to the pool.

Unfortunately, calling these methods seems to also close down the initial parent stream which should still contain content and be readable after the secondary connection is closed.

Should I be using the multithreaded HostConfiguration here?

-Mark


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to