users@jersey.java.net

[Jersey] Re: Connection Retry on jersey 1.5 Client

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Mon, 07 Feb 2011 14:10:43 +0100

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
>