hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Sutton <adr...@intencha.com>
Subject MultiThreadedHttpConnectionManager Questions
Date Wed, 09 Apr 2003 22:47:29 GMT
It seems the MultiThreadedHttpConnectionManager has become popular of 
late. :)  A couple of questions came through the commons-user list 
today that I thought I'd point out over here.

Firstly, the method:
public HttpConnection getConnection(HostConfiguration hostConfiguration)

has a while (true) loop that catches and logs all HttpExceptions.  The 
method doesn't claim to thrown IOExceptions so it looks like if 
something goes wrong it will loop forever.  I can't believe noone's run 
into this problem yet (though it may be contributing to some of the 
threads going awol in bug 18596 that Mike has been working on).  I have 
asked the user to file a bug report on this to be sure the concern 
isn't lost anyway.

Secondly, an enquiry came through regarding how to determine the number 
of "connections available" (where "connections available" means free 
connections + connections that can be created before reaching 
maxConnections).  I suggested:

manager.getMaxConnectionsPerHost() - 
manager.getConnectionsInUse(hostConfiguration);

However the proposed patch for bug 18596 makes this more complex.  So 
could there be a request for a method that determines how many 
connections can be made gets added?

The support desk seems to be having trouble keeping up with the 
developers lately. :)

Adrian Sutton.


Mime
View raw message