You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Jason Dillon <ja...@planet57.com> on 2011/11/30 01:31:48 UTC
How to configure default endpoint
The ProducerTemplate (2.8.3) javadocs talk about methods that send to "to the default endpoint"... but how does one configure that that endpoint is?
I see that DefaultProducerTemplate has methods like:
public void setDefaultEndpointUri(String endpointUri) {
public void setDefaultEndpoint(Endpoint defaultEndpoint) {
But these are not on ProducerTemplate. CamelContext.createProducerTemplate() returns a ProducerTemplate, so to set the default you need to cast? Really?
Is this an oversight or by design?
--jason
Re: How to configure default endpoint
Posted by Willem Jiang <wi...@gmail.com>.
Hi Jason,
Good catch, I checked the code of ProducerTemplate, there is no method
to set the DefaultEndpoint, I just created a JIRA[1].
Now you need to cast the ProducerTemplate to DefaultProducerTemplate for it.
[1]https://issues.apache.org/jira/browse/CAMEL-4728l
On Wed Nov 30 08:31:48 2011, Jason Dillon wrote:
> The ProducerTemplate (2.8.3) javadocs talk about methods that send to "to the default endpoint"... but how does one configure that that endpoint is?
>
> I see that DefaultProducerTemplate has methods like:
>
> public void setDefaultEndpointUri(String endpointUri) {
> public void setDefaultEndpoint(Endpoint defaultEndpoint) {
>
> But these are not on ProducerTemplate. CamelContext.createProducerTemplate() returns a ProducerTemplate, so to set the default you need to cast? Really?
>
> Is this an oversight or by design?
>
> --jason
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang