On Tue, 2008-02-26 at 01:52 +0000, [EMAIL PROTECTED] wrote:
> For a new project we're going to start using the Apache httpclient. One of 
> the things I've had trouble with in prior systems is that long-running 
> services get into states where they stop operating correctly. The solution 
> was usually to throw away the old socket and connection objects and create 
> new ones(discard and recreate always worked, more graceful methods didn't).
> 
> What I don't see in the HttpClient / HttpConnection / HttpConnectionManager 
> is the facility to remove a specific connection from a connection pool and 
> create a new one (assuming the others are working okay). Is this handled 
> entirely within the HttpConnectionManager based on socket state and the type 
> of error, or is there something additional I should do for a long-running 
> service? (By "long-running service", I'm referring to a service that should 
> run years without intervention or restart, though "years" in this case is 
> more accurately measured in months.)
> 

Shawn,

Just close the connection after having used it to serve a specific
number of requests or bytes prior to returning it to the connection
manager.   

It might be somewhat difficult to pull off with the old 3.x API but
should be fairly straightforward with 4.0 (big, ugly disclaimer: 4.0 is
still alpha)

Hope this helps

Oleg


> Sorry if this is a basic question, I haven't been able to find the answer 
> elsewhere or in the tutorials.
> 
> Thanks,
> -- Shawn
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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