[ 
https://issues.apache.org/jira/browse/CAMEL-15049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105396#comment-17105396
 ] 

aboudi rawas edited comment on CAMEL-15049 at 5/12/20, 12:51 PM:
-----------------------------------------------------------------

Now that I thought about it. Something worth's mentioning that when using this 
method, some type checking needs to be implemented because it would be bad to 
point the builder to a bean having a different type than SedaComponent or in my 
example case ActiveMQComponent.
{code:java}
SedaComponent seda2 = new SedaComponent();
context.addComponent("seda2", seda2); 
// the following line should fail because "seda2" has the same type as 
seda(...). Not direct(...), nor timer(...), etc...
from(direct("foo").customName("seda2")).to(mock("result"));{code}
 


was (Author: aboudirawas):
Now that I thought about it. Something worth's mentioning that when using this 
method, some type checking needs to be implemented because it would be bad to 
point the builder to a bean having a different type than SedaComponent or in my 
example case ActiveMQComponent.
{code:java}
SedaComponent seda2 = new SedaComponent();
 context.addComponent("seda2", seda2); 
 // the following line should fail because "seda2" has the same type as 
seda(...). Not direct(...), nor timer(...), etc...
 from(direct("foo").customName("seda2")).to(mock("result"));{code}
 

> camel-endpointdsl - Specify component (bean) name without using uri
> -------------------------------------------------------------------
>
>                 Key: CAMEL-15049
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15049
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-activemq, camel-endpointdsl
>    Affects Versions: 3.2.0
>         Environment: spring boot 2.2.6
> camel 3.2.0
> java jdk 11
>            Reporter: aboudi rawas
>            Assignee: Claus Ibsen
>            Priority: Major
>              Labels: features
>             Fix For: 3.4.0
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> It is not so uncommon to have multiple ActiveMQComponent beans in projects I 
> worked on.
> It is desirable to have an option to specify bean name in camel-endpoint dsl 
> something like this way ( assuming that there exists two ActiveMQComponent, 
> one called 'activemq' and the other called 'activemqservice' ).
> from(activemq("queueName").componentName("activemqservice"))
> Instead of just having the option to do this using URIs like
> from("activemqservice:queueName?...")...



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to