camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem jiang <willem.ji...@gmail.com>
Subject Re: Camel-http4 component throws Connection refused error
Date Fri, 01 Feb 2013 07:39:57 GMT
Thanks for reporting this, I just fill a JIRA[1] for it.
I think we need to provide the options let the user get control of connection management.

[1]https://issues.apache.org/jira/browse/CAMEL-6026  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Friday, February 1, 2013 at 3:18 AM, apatel wrote:

> 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
> ThreadSafeClientConnManager(schemeRegistry);
> if (getMaxTotalConnections() > 0) {
> answer.setMaxTotal(getMaxTotalConnections());
> }
> if (getConnectionsPerRoute() > 0) {
> answer.setDefaultMaxPerRoute(getConnectionsPerRoute());
> }
> LOG.info (http://LOG.info)("Created ClientConnectionManager " + answer);
>  
> return answer;
> }
>  
> Thanks,
> Amit Patel
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-http4-component-throws-Connection-refused-error-tp5726673.html
> Sent from the Camel Development mailing list archive at Nabble.com (http://Nabble.com).




Mime
View raw message