hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: Questions related to the use of HttpClient classes
Date Fri, 06 Jun 2003 09:59:07 GMT
Manuel,
You can still recycle HttpMethods, but in my opinion it does not really make a lot of sense.
You should keep an HttpState instance on per user basis. Additionally you can reuse SimpleHttpConnectionManager
in order to cut on some object instantiation overhead.

Cheers

Oleg

-----Original Message-----
From: Manuel Castro Paliza [mailto:mcp219@tid.es]
Sent: Friday, June 06, 2003 11:50
To: Commons HttpClient Project
Subject: RE: Questions related to the use of HttpClient classes


OK,
 but now the Question is:

is there any kind of "recyclable things" in a HttpClient between two usages?
Or is as simple as reassign HostConfiguration and State.

Thanks.
You don't really know how helpful is this list!,

-----Mensaje original-----
De: Kalnichevski, Oleg [mailto:oleg.kalnichevski@bearingpoint.com]
Enviado el: viernes, 06 de junio de 2003 10:52
Para: Commons HttpClient Project
Asunto: RE: Questions related to the use of HttpClient classes


Manuel,

HttpMethod instances and HttpConnection instances do not form any sort of
association. HttpMethod instance always receives HttpConnection as a
parameter, acts upon it, and then releases it (or is supposed to release it)
back to the connection manager. HttpMethod instance never keeps a reference
to its respective HttpConnection instance. Therefore pooling of HttpMethods
does not result in a pool of connections. As far as I can tell, HttpMethod
pooling does not really bring much. You may simply want to maintain a pool
of HttpClient instances instead.

Oleg

-----Original Message-----
From: Manuel Castro Paliza [mailto:mcp219@tid.es]
Sent: Friday, June 06, 2003 10:35
To: Commons HttpClient Project
Subject: RE: Questions related to the use of HttpClient classes


One question More.
I'm working on a kind of proxy,
I have ( a lot of ) different users connecting to different servers
MultiThreadedHttpConnectionManager its not an option because each user will
do one request each time, and something like new HttpClient(MySingleton
Instance of MultiThreadedHttpConnectionManager ) limits the maximum number
of connections to a host.
I'm using a Pool of Methods but I don't know if this is also a High-Level
pool of Connections.

So finally the cuestion is :
is a Pool of Methods also a  High-Level pool of Connections when not using
MultiThreadedHttpConnectionManager ?

Can anybody help me?

Thanks for this useful Component!



---------------------------------------------------------------------
To unsubscribe, e-mail:
commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
commons-httpclient-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail:
commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail:
commons-httpclient-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message