hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: HttpClient and Concurrent requests to the same host.
Date Wed, 03 Mar 2004 17:40:45 GMT
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: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message