You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Mathias Schwaninger <mu...@gmx.net> on 2005/09/27 10:24:14 UTC
Problem with MultiThreadedHttpConnectionManager and registerProtocol
Hi,
i have a problem using the MultiThreadedHttpConnectionManager class.
It works very well if i use it as standard like this:
oHttpCon = new HttpClient(new MultiThreadedHttpConnectionManager() );
oHttpCon.getHostConfiguration().setHost(oHostUrl.getHost(),
oHostUrl.getPort());
But now i want to register my own SocketFactory so i changed the source as
follows
oHttpCon = new HttpClient(new MultiThreadedHttpConnectionManager() );
Protocol http = new Protocol("http",
new StrictSocketFactory(nRangeLow,nRangeHigh),
80
);
Protocol.registerProtocol("http",http);
oHttpCon.getHostConfiguration().setHost(oHostUrl.getHost(),
oHostUrl.getPort(), http );
This results in the following error message by
MultiThreadedHttpConnectionManager when freeing the connection.
27.09.2005
09:30:09
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool
freeConnection
SCHWERWIEGEND: Host connection pool not found,
hostConfig=HostConfiguration[host=localhost, protocol=http:80, port=6260]
I think the only difference between this two scenarios is the Protocol stuff
but i don't know why this results in that error message.
Any suggestions ?
I'm using HttpClient 2.0 final.
Regards,
Mathias
--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen f�r GMX Partner: http://www.gmx.net/de/go/partner
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org