cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Léger (JIRA) <j...@apache.org>
Subject [jira] [Updated] (CXF-6657) CXF Failover using JAXRS prevents header retrieval from ResponseExceptionMappers
Date Fri, 30 Oct 2015 10:35:27 GMT

     [ https://issues.apache.org/jira/browse/CXF-6657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Florian Léger updated CXF-6657:
-------------------------------
    Attachment: Failover-make-failover-work-without-forcing-org.apac.patch

Patch

> 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
>         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