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

Andriy Redko resolved CXF-8109.
-------------------------------
      Assignee: Andriy Redko
    Resolution: Information Provided

The documentation section has been updated: 
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=49941#ClientHTTPTransport(includingSSLsupport)-HowtouseHTTPConduitConfigurer?

> Instructions for configuring client programmatically do not survive failover
> ----------------------------------------------------------------------------
>
>                 Key: CXF-8109
>                 URL: https://issues.apache.org/jira/browse/CXF-8109
>             Project: CXF
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 3.3.3
>            Reporter: Neeme Praks
>            Assignee: Andriy Redko
>            Priority: Minor
>
> [http://cxf.apache.org/docs/client-http-transport-including-ssl-support.html#ClientHTTPTransport(includingSSLsupport)-Usingjavacode]
>  suggests to configure HttpConduit like this:
> {code:java}
> Client client = ClientProxy.getClient(greeter);
> HTTPConduit http = (HTTPConduit) client.getConduit();
>  
> HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
>  
> httpClientPolicy.setConnectionTimeout(36000);
> httpClientPolicy.setAllowChunking(false);
> httpClientPolicy.setReceiveTimeout(32000);
>  
> http.setClient(httpClientPolicy);
> {code}
> While this works initially, it fails as soon as a failover happens. During 
> failover, existing {{HttpConduit}} is disposed and new one is created. The 
> policy and other settings are not copied from old conduit to new one (we 
> found out the hard way, in production).
> Instead, one should get hold of {{Bus}} instance (we get it from Spring) and 
> make use of {{HTTPConduitConfigurer}} extension point:
> {code:java}
> bus.setExtension(httpConduitConfigurer, HTTPConduitConfigurer.class);
> {code}
> We use {{JaxWsProxyFactoryBean}} for this (it has {{setBus()}} method), I'm 
> not sure how to modify the sample in the documentation.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to