hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: disable the connection persistence
Date Mon, 07 Nov 2005 21:30:25 GMT
On Mon, 2005-11-07 at 17:53 +0000, kunal ashar wrote:
> Hi
>  
> To disable the connection persistence can I override the releaseConnection() method and
close the connection immediately?
>  

This is exactly what you should be doing

> For example
>  
>  public class MyHTTPConnectionManager extends SimpleHttpConnectionManager{
>  
>  public MyHTTPConnectionManager() {
>     super();
>      }
>   
>   public void releaseConnection(HttpConnection conn) {
>     super.releaseConnection(conn);
>     conn.close();
>   }
>  }
>  
> If I am not wrong, in case of SimpleHttpConnectionManager  we are not using any connection
pool, if that is the case why persistence connection is used in case of SimpleHttpConnectionManager
? 
>  

Because connection persistence results in a noticeable performance
improvement and there are enough applications out there that are
intended to communicate with just one host or one host at a time. 

Oleg

> Thanks
> Ashar
> 
> 
> 		
> ---------------------------------
> Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail 


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


Mime
View raw message