singleton httpclient

Jim Fox fox at washington.edu
Mon Nov 18 16:39:53 EST 2019


> 
> Brent would know better than I, but I don't think it is. We don't install our own ConnectionManager from what I can see, which means it auto-insta
> lls a PoolingHttpClientConnectionManager, and that's why the builder we have exposes properties like max connections and max per-route.
> 
> It's all a bit spaghetti, but that's how it read to me. I think I've tested that in the past and certainly seen it operate multiple connections at
>  a time.
> 
> 
> Yes, that's correct as far as I know.  The Apache builder, which our builder wraps, defaults to a PoolingHttpClientConnectionManager, so that's
> what you get by default.
>

Possibly I was confused by the code in .../ext/spring/factory/HttpClientFactoryBean.java, which seemd to indicate that the HttpClient was a singleton.  Is that something of a distraction? 
In any case I see the configurations for max clients.

Thanks,

Jim


More information about the dev mailing list