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: Reconnecting when using MultiThreadedHttpConnectionManager
Date Wed, 15 Oct 2003 01:37:14 GMT
Hi Itai,

Could you be more specific about what you mean by reconnect?  What 
exactly is happening?  A stack trace and wire log 
<http://jakarta.apache.org/commons/httpclient/logging.html> would be 
helpful.  Generally speaking HttpClient should handle creating, opening 
and closing all connections.  You are only responsible for releasing 
the connection after each method execution.

Mike

On Tuesday, October 14, 2003, at 01:13 PM, Itai Brickner wrote:

> I am using the The MultiTrhadHttpConnectionManger, and
> I am not sure how to reconnect when I get
> HttpRecoverableExeception due to long idle time
>
>
> this is the code im using
>
> public void foo(MultiThreadedHttpConnectionManager
> manager)
> {
>   GetMethod method;
>   try
>   {
>     HttpClient con=new HttpClient(manager);
>     method=new GetMethod(string);
>     con.executeMethod(method);
>   }
>   catch (HttpRecoverableException e)
>   {
>      //I am not sure how to reconnect
>   }
>   finally
>   {
>     method.releaseConnection();
>   }
> }
>
>
> thanks,
> Itai
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: 
> commons-httpclient-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
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