On Tue, 2016-06-07 at 11:06 +0200, Ivan Brencsics wrote:
> Hi,
> 
> I have some trouble using SSL together
> with PoolingHttpClientConnectionManager.
> 
> I create an HttpClient by setting both the SSLContext and ConnectionManager
> and the SSLContext is ignored. I read that others had the same problem and
> solved it by adding a Socket Factory Registry to the Connection Manager.
> However, I dont find this a good solution. I would like to create one and
> only one connection pool for my application, and then provide it to all
> HttpClient instances I create later on. 

What is the point doing so? You might as well have just one instance of
HttpClient which is basically recommended anyway.

> When I instantiate the connection
> pool, I dont know exactly what connections I will create later with what
> SSL parameters. Your solution assumes that when instantiating the
> PoolingHttpClientConnectionManager, we are already aware of all the SSL
> settings that we will ever use. This is very often not the case.
> 
> Why are the SSL settings so tightly coupled to
> PoolingHttpClientConnectionManager? 

Because the pool manager is responsible for keeping track of persistent
connection state. 

> And do I understand correctly that if I
> am using SSL, I should create separate PoolingHttpClientConnectionManager
> instances towards the different remote servers?
> 

No, you should not.

Oleg


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

Reply via email to