cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem jiang <willem.ji...@gmail.com>
Subject Re: Fail-over support for HTTP errors
Date Wed, 13 Nov 2013 01:24:44 GMT
+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  



Mime
View raw message