hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 23703] - Freezes w/ MultiThreadedHttpConnectionManager
Date Fri, 10 Oct 2003 23:07:34 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23703>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23703

Freezes w/ MultiThreadedHttpConnectionManager

olegk@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.0 Final



------- Additional Comments From olegk@apache.org  2003-10-10 23:07 -------
It turned out that the problem is REALLY easy to reproduce. The following code
reliably locks the multi-threaded connection manager:

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
import org.apache.commons.httpclient.methods.HeadMethod;

public class Test {

    public static void main(String args[]) throws Exception {

        MultiThreadedHttpConnectionManager manager = 
          new MultiThreadedHttpConnectionManager();
        manager.setMaxTotalConnections(5);
        HttpClient agent = new HttpClient(manager);
        agent.getHostConfiguration().setHost("news.com");
        for (int i = 0; i < 6; i++) {
            HeadMethod httphead = new HeadMethod("/");
            httphead.setFollowRedirects(true);
            try {
                agent.executeMethod(httphead);   
            } finally {
                httphead.releaseConnection();
            }
        }
    }
}

Oleg

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message