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 Thu, 16 Oct 2003 03:17:54 GMT
Could you be more specific?

Mike

On Wednesday, October 15, 2003, at 10:42 PM, Itai Brickner wrote:

> Im not sure who is in charge, but I think someone
> should update the tutorial...
>
> thanks,
> Itai
> --- Michael Becke <becke@u.washington.edu> wrote:
>> Yep, that will do it.  Having
>> connectionStaleChecking disabled will
>> lead to a few unreliable connections.
>>
>> Mike
>>
>> On Wednesday, October 15, 2003, at 01:20 PM, Itai
>> Brickner wrote:
>>
>>> Hi Mike,
>>>
>>> I think the problem was actually solved once I
>> added
>>>
>>
> connectionManager.setConnectionStaleCheckingEnabled(true);
>>>
>>> does this makes sense?
>>>
>>> thanks,
>>>
>>> Itai
>>> --- Michael Becke <becke@u.washington.edu> wrote:
>>>> 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
>>>>
>>>
>>>
>>> __________________________________
>>> 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
>>
>
>
> __________________________________
> 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