cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6657) CXF Failover using JAXRS prevents header retrieval from ResponseExceptionMappers
Date Fri, 30 Oct 2015 12:19:27 GMT

    [ https://issues.apache.org/jira/browse/CXF-6657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14982470#comment-14982470
] 

Sergey Beryozkin commented on CXF-6657:
---------------------------------------

Thanks for a patch, I applied with small modifications, in 2.7.18-SNAPSHOT HttpConduit changed
a bit, so I did apply the code manually there and I introduced few String constants - though
I know I've been liberal with using literals a lot :-), overall the patch looks good, cheers

> CXF Failover using JAXRS prevents header retrieval from ResponseExceptionMappers
> --------------------------------------------------------------------------------
>
>                 Key: CXF-6657
>                 URL: https://issues.apache.org/jira/browse/CXF-6657
>             Project: CXF
>          Issue Type: Bug
>          Components: clusting, JAX-RS, Transports
>    Affects Versions: 2.7.17
>         Environment: JAXRS Client 2.7.17 with Sequential Failover and a ResponseExceptionMapper.
>            Reporter: Florian L├ęger
>             Fix For: 2.7.18, 3.0.7, 3.1.4
>
>         Attachments: Failover-make-failover-work-without-forcing-org.apac.patch
>
>
> Our custom ResponseExceptionMapper is designed to transform responses with status code
400 into client code exceptions by retrieving custom header properties.
> This works as long as the failover feature is not enabled, were would want the failover
code to be triggered only in case of support not available errors but let through other status
codes 
> When using the FailoverFeature and even when setting the supportNotAvailableErrorsOnly
property of the FailoverTargetSelector to true, an HttpException is raised in the handleResponseInternal
method of HTTPConduit which prevents the headers from being updated in the input message.
> This is due to the fact that the FailoverTargetSelector clears the org.apache.cxf.transport.no_io_exceptions
flag set by JAXRS.
> The attached patch make the FailoverTargetSelector clears the org.apache.cxf.transport.no_io_exceptions
flag only when supportNotAvailableErrorsOnly is false. It also modifies HTTPConduit.handleResponseInternal
to set org.apache.cxf.transport.service_not_available even if no IOExceptions should be thrown
so that the failover code could catch such cases. Finally, it also make the preProcessResult
method of jaxrs AbstractClient complete the conduit selector if org.apache.cxf.transport.service_not_available
is true in case of failover.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message