cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <>
Subject Fail-over support for HTTP errors
Date Tue, 12 Nov 2013 19:19:51 GMT

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


View raw message