hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: MultiThreadedHttpConnectionManager.shutdown()
Date Sat, 13 Mar 2004 00:58:09 GMT
Hi Dave,

I've included the httpclient-dev mailing list in my response, as I 
imagine other people will have similar questions.  Please see me 
comments in-lined below.

> I have a couple questions about your shutdown method :
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27589
>
>
> (1) Does this call effect all connections, or just those used by the 
> one instance?
>
> MultiThreadedHttpConnectionManager myConMgr = new 
> MultiThreadedHttpConnectionManager();
> ....
> ...
> myConMgr.shutdown()
>
> That is, I want to make sure HttpConnection.close() gets called on 
> each thread currently using
> this particular instance of the connection manager.  NOT all 
> HttpConnection used in the JVM.
> Does your code iterate over the list for this con mgr, or the static 
> singleton of the entire JVM?

shutdown() closes all connections  __currently in possession__ of a 
particular instance of a connection manager.  It does nothing to 
connections that have been checked out.  So, any connection currently 
being used in a method will not be effected.  The shutdown() and 
shutdownAll() methods are meant just to clean-up after the connection 
mangers when they are no longer in use.

As I mentioned in in the Bug comments I think an abort method is more 
what you are looking for.

> (2) where can I find a fresh file with your code merged into it?

Nowhere at the moment, as the patch has not been checked in.  I have 
attached the modified MultiThreadedHttpConnectionManager.

Mike


Mime
View raw message