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

Oleg Kalnichevski commented on HTTPCLIENT-2321:
-----------------------------------------------

[~kwin] `{{{}BasicHttpClientConnectionManager{}}}` was created in those dark 
days when people used to put HttpClient inside a stateless session EJB and 
needed an implementation backed by a single connection. It was _never_ meant to 
be the default implementation.

Generally HttpClient builders should be able to pick the best implementation as 
they deem fit without making it a part of the public contract if those 
implementations have not been explicitly set by the consumer.

I am not in favor of this change.

Oleg

 

> Clarify the default connection manager being used
> -------------------------------------------------
>
>                 Key: HTTPCLIENT-2321
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2321
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 5.4-alpha1
>            Reporter: Konrad Windszus
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Neither from reading 
> https://hc.apache.org/httpcomponents-client-4.5.x/current/tutorial/html/connmgmt.html
>  nor from the javadocs at either 
> # 
> https://hc.apache.org/httpcomponents-client-5.3.x/current/httpclient5/apidocs/org/apache/hc/client5/http/impl/classic/HttpClientBuilder.html,
> # 
> https://hc.apache.org/httpcomponents-client-5.3.x/current/httpclient5/apidocs/org/apache/hc/client5/http/io/HttpClientConnectionManager.html
>  or
> # 
> https://hc.apache.org/httpcomponents-client-5.3.x/current/httpclient5/apidocs/org/apache/hc/client5/http/impl/io/PoolingHttpClientConnectionManager.html
> it is clear that the {{PoolingHttpClientConnectionManager}} is used by 
> default if no other connection manager is set explicitly 
> (https://github.com/apache/httpcomponents-client/blob/f2b9a374d817ee630a2efe706546ba4f1e5a5ac4/httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/HttpClientBuilder.java#L754).
> I was always assuming that due to the [KISS 
> principle|https://en.wikipedia.org/wiki/KISS_principle] the one named 
> {{BasicHttpClientConnectionManager}} would be the default.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to