camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apatel <>
Subject Camel-http4 component throws Connection refused error
Date Thu, 31 Jan 2013 19:18:35 GMT
I am getting org.apache.http.conn.HttpHostConnectException exception when i
use the http4 component in routes, but the same routes work fine if i use
the http component. 

When i look at the code, i found below method in
org.apache.camel.component.http4.HttpComponen create
ThreadSafeClientConnManager, I am wondering in which place it release the
connection or sets connTTL( connection lifetime, <=0 implies "infinity"), i
don't find any place to set connTTL. i can delay the error by setting
connectionsPerRoute to 10000.

protected ClientConnectionManager createConnectionManager() {
        SchemeRegistry schemeRegistry = new SchemeRegistry();

        ThreadSafeClientConnManager answer = new
        if (getMaxTotalConnections() > 0) {
        if (getConnectionsPerRoute() > 0) {
        }"Created ClientConnectionManager " + answer);

        return answer;

Amit Patel

View this message in context:
Sent from the Camel Development mailing list archive at

View raw message