You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Guillermo <gl...@tecsisa.com> on 2013/03/20 19:08:45 UTC

Configure clientConnectionManager endpoint option in camel hhtp4

Hi,

I'm writting because I'm trying to configure the clientConnectionManager
httpEndpoint Option using camel-http4 but I'm having some problems. 

In my endpoint definition (same endpoint, different configs each time) I'm
adding the option ?clientConnectionManager=XXX where XXX is a reference to a
custom org.apache.http.conn.ClientConnectionManager in the registry (a new
SingleClientConnManager in my case). In my route, I retrieve an HttpEndpoint
like this:

HttpEndpoint httpEndpoint = (HttpEndpoint)
CamelContextHelper.getMandatoryEndpoint(camelContext, endpointUri); 

And after that, an exception is thrown:

Failed to resolve endpoint:
https4://hostname?clientConnectionManager=XXX&httpClient.soTimeout=60000&httpClientConfigurer=YYY
due to: Could not find a suitable setter for property:
clientConnectionManager as there isn't a setter method with same type:
java.lang.String nor type conversion possible: No type converter available
to convert from type: java.lang.String to the required type:
org.apache.http.conn.ClientConnectionManager with value XXX

My question is: What is the correct way to configure this option? I need
that to use a different connection manager when I'm configuring each
httpClient with the option httpClientConfigurer (in this case the appropiate
configuration is set and registered and I'm using the same way to do that
but with the other option is not working).

Thanks in advance.

Guillermo.

Additional info:
Using camel version 2.9.1 





--
View this message in context: http://camel.465427.n5.nabble.com/Configure-clientConnectionManager-endpoint-option-in-camel-hhtp4-tp5729558.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Configure clientConnectionManager endpoint option in camel hhtp4

Posted by Guillermo <gl...@tecsisa.com>.
Hi,

I was not using the #. That worked, thank you!

Guillermo.



--
View this message in context: http://camel.465427.n5.nabble.com/Configure-clientConnectionManager-endpoint-option-in-camel-hhtp4-tp5729558p5729751.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Configure clientConnectionManager endpoint option in camel hhtp4

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Make sure you use #XXX eg the # indiciate a reference lookup in the registry.



On Wed, Mar 20, 2013 at 7:08 PM, Guillermo <gl...@tecsisa.com> wrote:
> Hi,
>
> I'm writting because I'm trying to configure the clientConnectionManager
> httpEndpoint Option using camel-http4 but I'm having some problems.
>
> In my endpoint definition (same endpoint, different configs each time) I'm
> adding the option ?clientConnectionManager=XXX where XXX is a reference to a
> custom org.apache.http.conn.ClientConnectionManager in the registry (a new
> SingleClientConnManager in my case). In my route, I retrieve an HttpEndpoint
> like this:
>
> HttpEndpoint httpEndpoint = (HttpEndpoint)
> CamelContextHelper.getMandatoryEndpoint(camelContext, endpointUri);
>
> And after that, an exception is thrown:
>
> Failed to resolve endpoint:
> https4://hostname?clientConnectionManager=XXX&httpClient.soTimeout=60000&httpClientConfigurer=YYY
> due to: Could not find a suitable setter for property:
> clientConnectionManager as there isn't a setter method with same type:
> java.lang.String nor type conversion possible: No type converter available
> to convert from type: java.lang.String to the required type:
> org.apache.http.conn.ClientConnectionManager with value XXX
>
> My question is: What is the correct way to configure this option? I need
> that to use a different connection manager when I'm configuring each
> httpClient with the option httpClientConfigurer (in this case the appropiate
> configuration is set and registered and I'm using the same way to do that
> but with the other option is not working).
>
> Thanks in advance.
>
> Guillermo.
>
> Additional info:
> Using camel version 2.9.1
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Configure-clientConnectionManager-endpoint-option-in-camel-hhtp4-tp5729558.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Configure clientConnectionManager endpoint option in camel hhtp4

Posted by santhosh <ra...@gmail.com>.
my two cents.From what i see, my intial thoughts are the setter is expecting
a org.apache.http.conn.ClientConnectionManager and you are assigning a
string.Usually the type convertor kicks in , which converts the string value
to org.apache.http.conn.ClientConnectionManager object .This is missing in
runtime.Did you try to reference 
org.apache.http.conn.ClientConnectionManager object from registry.Worth a
try.



--
View this message in context: http://camel.465427.n5.nabble.com/Configure-clientConnectionManager-endpoint-option-in-camel-hhtp4-tp5729558p5729569.html
Sent from the Camel - Users mailing list archive at Nabble.com.