hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Question on features of HTTPClient 2.0
Date Mon, 07 Nov 2005 15:13:46 GMT
On Mon, Nov 07, 2005 at 02:41:37PM +0000, kunal ashar wrote:
> Thanks for the reply.
>  
> When the connection will be come idle?.

When it is not being used.

>  
> Why do we need to forcefully run the separate thread to close the idle connections like
CLOSE_WAIT?  

Because there's no way to query the state of a socket in Java (I know
of)

OS will close these connections after some particular amount of time if we don't run this
thread?
>  

The connection will eventually get closed by the GC if it is no longer
referenced. However, the process of garbage collection is often non
deterministic, so lots of idle connections can pile up before they get
GCed

Oleg

> Thanks
> Ashar
>  
>  
> 
> 
> Oleg Kalnichevski <olegk@apache.org> wrote:
> On Mon, Nov 07, 2005 at 01:01:58PM +0000, kunal ashar wrote:
> > 
> > Hi,
> > 
> > 
> > 
> > One of the HTTPClinet 2.0 Features says that
> > 
> > 
> > 
> > Connection management support for use in multi-threaded applications. Supports setting
the maximum total connections as well as the maximum connections per host. Detects and closes
stale connections. 
> > 
> > 
> > 
> > This says that it detects and closes the stale connections. 
> > 
> > 
> > My questions is 
> > 
> > 
> > 
> > "Is closing of idle connections are automatically taken care or we need to implement
IdleConnectionTimeoutThread to close the idle connections forcefully?"
> > 
> > 
> 
> Idle and stale connections are different things. Stale connections are
> automatically taken care of per default, whereas idle ones are not.
> Please note as well that IdleConnectionTimeoutThread is available in
> HttpClient 3.0 only. 
> 
> Hope this helps,
> 
> Oleg
> 
> 
> > 
> > Thanks
> > Ashar
> > 
> > 
> > 
> > 
> > 
> > ---------------------------------
> > How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo!
Photos. Get Yahoo! Photos
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org
> 
> 
> 		
> ---------------------------------
> To help you stay safe and secure online, we've developed the all new Yahoo! Security
Centre.

---------------------------------------------------------------------
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