DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=25372>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=25372

auto close idle connections





------- Additional Comments From [EMAIL PROTECTED]  2004-04-19 16:23 -------
> 1) Looks like IdleConnectionHandler will have multi-threading issues: the add
> method modifies the tree, while the closeIdleConnections method is trying to
> iterate through the keySet.

I think it perfectly OK for IdleConnectionHandler to assume that multi-threading
issues will be taken care of by the HttpConnectionManager

> 2) I'm not sure I understand why IdleConnectionHandler has a tree of 
> lists (very expensive structure) as well as a hashset. Can't we handle 
> this with just a simple list and a hashset?

A tree of lists can scale much better and will be more efficient when dealing
with a significant number of connections. However, I think it is certainly an
overkill for the simple (one connection) connection manager. Mike, can we have
something lighter for the SimpleHttpConnectionManager?

> 3) If IdleConnectionHandler.closeIdleConnections is never called, will 
> the tree structure ever get cleaned up? Is there a memory leak under 
> this condition?

Mike, is there any particular reason for not removing connections from the tree
of lists in the IdleConnectionHandler#remove method?

> 4) Can we add a simple utility class that implements thread and calls
> IdleConnectionHandler.closeIdleConnections so that everyone doesn't have to
> write their own?

Agreed. A simple helper class can be quite handy

Overall, the patch looks very good to me

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to