Yes, but recommendation says 2-3 connections per host/server..
and I don't know the number of simultaneous connections, nor the peak,
what about changing it at runtime?.

finally I did a HttpClientPool with singleton SimpleHttpConnectionManager
with a Factory but I'm not sure if the SimpleHttpConnectionManager can
actually  be Singleton or not.

//private MultiThreadedHttpConnectionManager mtcm = null;
  private SimpleHttpConnectionManager stcm=null;
  protected HttpClientFactory() {
   // mtcm = new MultiThreadedHttpConnectionManager();
    stcm= new SimpleHttpConnectionManager();
  }
 public Object newInstance() {
    log.debug("Creation of a new Client!");
    return new HttpClient(stcm/*this.mtcm*/);
  }

Thanks!.


-----Mensaje original-----
De: Michael Becke [mailto:[EMAIL PROTECTED]
Enviado el: viernes, 06 de junio de 2003 14:12
Para: Commons HttpClient Project
Asunto: 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.

Connections per host is configurable if that helps.  see
MultiThreadedHttpConnectionManager.setMaxConnectionsPerHost().

Mike


---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to