cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: Fail-over support for HTTP errors
Date Thu, 14 Nov 2013 13:14:16 GMT
Yes, I updated it on the trunk.
If it is a client error (badly prepared request, security-related 
errors) then failing over to another target can be problematic and even 
risky. I'd even completely disable it but lets keep the option for users 
to re-enable the old behavior if they really really need it

Cheers, Sergey


On 13/11/13 01:24, Willem jiang wrote:
> +1, it makes sense.
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> Web: http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
>            http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Wednesday, November 13, 2013 at 3:19 AM, Sergey Beryozkin wrote:
>
>> Hi
>>
>> While working on fixing [1] which is really about the JAX-RS client code
>> not working with the failover feature in case of exceptions caused by
>> statuses like 404 (Not Found), which works fine for JAX-WS, I spotted
>> that by default the fail-over will also be activated by statuses like
>> 401, 403 or 405-415, etc.
>>
>> I think activating the feature in case of 404 or 503 is very reasonable,
>> but IMHO it can be wrong to do it when say the client has failed to
>> authorize with 403 or authenticate with the supplied credentials (401):
>> in this case the client should get an immediate exception.
>>
>> So I added a flag to FailoverTargetSelector,
>> supportNotAvaialbleErrorsOnly, this can be enabled so that 401/403 and
>> other statuses except 404 or 503, do not activate the feature.
>>
>> I reckon that this flag should be set to true by default on the trunk,
>> otherwise we can have a 'failover' concept 'overloaded' by using the
>> alternative addresses
>>
>> Thanks, Sergey
>>
>> [1] https://issues.apache.org/jira/browse/CXF-5378
>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Mime
View raw message