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?.
Yes, this is the recommend number according to the RFC. But, depending on your application, it may make sense to change this. Changing this value at runtime is probably not the best idea but it should work.
finally I did a HttpClientPool with singleton SimpleHttpConnectionManagerYou definitely do not want to share an instance of SimpleHttpConnectionManager. It only has a single connection and will give it to any code that asks for it, regardless of if it's already being used.
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*/); }
Mike
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
