users@jersey.java.net

[Jersey] Re: Jersey 2 per request timeout

From: Richard Sand <rsand_at_idfconnect.com>
Date: Wed, 15 Jun 2016 15:32:36 -0400

I wish I knew for certain, you're a bit beyond my level of kung-fu here :-)

Best regards,

Richard

> Rallavagu <mailto:rallavagu_at_gmail.com>
> June 15, 2016 at 1:28 PM
> As per the javadoc
>
> https://jersey.java.net/apidocs/latest/jersey/javax/ws/rs/core/Configurable.html#property(java.lang.String,%20java.lang.Object)
>
>
> "Set the new configuration property, if already set, the existing
> value of the property will be updated. Setting a null value into a
> property effectively removes the property from the property bag."
>
> Sounds like following line would overwrite the existing value. But
> could someone confirm if this can help with re-using the client?
>
> jerseyClient.property(ClientProperties.CONNECT_TIMEOUT,
> connectionTimeout);
>
>
> Richard Sand <mailto:rsand_at_idfconnect.com>
> June 15, 2016 at 1:07 PM
> I have separate jerseyClient and httpClient objects but they both use
> the same connection manager so I believe it will be the same
> connection pool. Instead of setting those timeouts on the
> jerseyClient, set the timeouts on the apache clientConfig and
> requestConfig objects as I did in the code snippet and then those get
> passed into jersey.
>
> Best regards,
>
> Richard
>
>