hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mingfai <mingfai...@gmail.com>
Subject Re: 4.0.1 -> 4.1
Date Mon, 19 Jul 2010 23:07:08 GMT
>
> > -----Original Message-----
> > From: Oleg Kalnichevski [mailto:olegk@apache.org]
> > Sent: Monday, July 19, 2010 3:26 PM
> > To: HttpClient User Discussion
> > Subject: Re: 4.0.1 -> 4.1
> >
> >
> > Take a look at
> >
> > ThreadSafeClientConnManager#setMaxTotalConnections and
> > ThreadSafeClientConnManager#setMaxsPerRoute
> >
> > There has been a number of complaints about misuse of HttpParams for
> > things that do not need parameter hierarchies. This is the reason why
> > HttpParams based connection pool configuration have been deprecated in
> > favor of simple setters and getters on the ThreadSafeClientConnManager
> > class.
> >
> > Oleg
> >
> >
>

I just learned it recently.

For the two parameters to work, we have to use the constructor without
HttpParams, i.e. new ThreadSafeClientConnManager(SchemeRegistry). I made a
mistake to use the ThreadSafeClientConnManager(httpParams, schemeRegistry)
constructor and found the properties won't take effect.

btw, there is one more method setDefaultMaxPerRoute

regards,
mingfai

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message