users@jersey.java.net

[Jersey] Re: Connection Retry on jersey 1.5 Client

From: Ryan Stewart <zzantozz_at_gmail.com>
Date: Tue, 8 Feb 2011 13:49:08 -0600

Apache's HttpClient supports connection retries, and you can plug an
HttpClient into a Jersey client as its HTTP provider.

On Mon, Feb 7, 2011 at 7:10 AM, Pavel Bucek <pavel.bucek_at_oracle.com> wrote:

> Hello Sisent,
>
> this is not "standard" http option in Java SE, but you can easily implement
> it by yourself, similarly to ReadTimeOut filter you are using. There is no
> limit to what you can do in filter, for example you can do multiple
> subsequent requests (which is almost what you need), see
> HTTPDigestAuthFilter.handle().
>
> And, if you want, you can file and RFE afterwards, include your patch and
> filter you implemented can be included in next release.
>
> Pavel
>
>
> On 02/04/2011 11:43 PM, SISE Inc. wrote:
>
> Hi,
>
>
>
> How do I set the number of Connection retry on the Client if I have the
> following code to get my WebResource?
>
>
>
> ClientConfig cc = *new* DefaultClientConfig();
>
> Client c = Client.*create*(cc);
>
> c.addFilter(*new* LoggingFilter()); //Login Filter
>
> resource = c.resource(buri);
>
> resource.addFilter(*new* ReadTimeOut(timeOut)); // Time out filter for
> Timeout
>
>
>
> The ClientConfig does not have any option for Connection Retry… Any help on
> this?
>
>
>
> Regards,
>
> sisent
>
>
>
>
>