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

Andriy Redko commented on CXF-9109:
-----------------------------------

Quick update folks

> Does it mean, that now, per-HTTPClientPolicy caching can be somehow removed 
> (because HTTPCLIENT-2209 is done)?
Is there some plan to remove per-HTTPClientPolicy?

Yes and no, the good news  - we could pass contextual parameters using 
HttpContext, bad news - most of the base implementation classes we need to 
reuse are not accessible, meaning we would have to replicate (copy/paste) a 
large number of them, mostly internal implementation. Looking for the options 
here.


> MAX_PER_HOST_CONNECTIONS does not work
> --------------------------------------
>
>                 Key: CXF-9109
>                 URL: https://issues.apache.org/jira/browse/CXF-9109
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 4.1.0, 3.6.5, 4.0.6
>            Reporter: shpelda
>            Assignee: Andriy Redko
>            Priority: Major
>             Fix For: 4.1.2, 4.0.8, 3.6.7
>
>         Attachments: ConnectionPoolingTest.java
>
>
> After migration from 3.4.4 to 4.1.0, one of my tests started crashing.
> In v3, AsyncHTTPConduitFactory used shared ConnectionManager, so that 
> bus-level properties 
> _org.apache.cxf.transport.http.async.MAX_CONNECTIONS_ and
> _org.apache.cxf.transport.http.async.MAX_PER_HOST_CONNECTIONS_
> worked across clients. 
> This properties were the reason why I used the AsyncHTTPConduitFactory, as i 
> had to limit count of created connections.
>  
> v3 implementation of AsyncHTTPConduitFactory used shared instance of client 
> and connectionManager, which finally caused above properties to work properly.
> hc5.AsyncHTTPConduitFactory(correctly) maintains cache of 
> httpclientPolicy->httpClient.
> However _PoolingAsyncClientConnectionManager_ must not created with each 
> client, but must be shared. Should be owned by the {_}Bus{_}.
> Otherwise connection pool cannot work correctly.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to