users@jersey.java.net

Re: [Jersey] retry configuration for ApacheHttpClient

From: Arul Dhesiaseelan <arul_at_fluxcorp.com>
Date: Fri, 13 Mar 2009 12:17:23 -0600

Redirects are set on the HttpMethodParams on the HttpClient. But,
HttpMethodRetryHandler interface uses Apache Client HttpMethod. So, I
don't this this would work:

  HttpClient client = new HttpClient(new
MultiThreadedHttpConnectionManager());
  // set retry
  client.getParams().setParameter(HttpMethodParams.RETRY_HANDLER,
retryhandler);
  ApacheHttpClient client = new ApacheHttpClient(new
ApacheHttpClientHandler(client));

Thanks!
Arul

Paul Sandoz wrote:
>
> On Mar 13, 2009, at 5:57 PM, Arul Dhesiaseelan wrote:
>
>> Hi,
>>
>> Is it possible to control the retry mechanism for the Client API
>> based on HttpClient? I think it defaults to 5.
>>
>
> No.
>
> I do not know where that property can be set, but if you can set it on
> HttpClient then you can do:
>
> HttpClient client = new HttpClient(new
> MultiThreadedHttpConnectionManager());
> // set retry
> ApacheHttpClient client = new ApacheHttpClient(new
> ApacheHttpClientHandler(client));
>
> Paul.
>
>> I do not see any config option available in ApacheHttpClientConfig.
>
>> -Arul
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>