[ 
https://issues.apache.org/jira/browse/CAMEL-11683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Keegan Witt updated CAMEL-11683:
--------------------------------
    Affects Version/s:     (was: 2.15.5)
                       2.19.1

> Allow bean references in to() URI
> ---------------------------------
>
>                 Key: CAMEL-11683
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11683
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 2.19.1
>            Reporter: Keegan Witt
>            Assignee: Claus Ibsen
>
> As a workaround to CAMEL-11528, we tried replacing something like 
> {code:java}
>  from("direct:start")
>     .wireTap("bean:tap")
>     .to("mock:result");
> {code}
>  
> with
> {code:java}
> from("direct:start")
>     .wiretap("direct:tap")
>     .to("mock:result");
> from("direct:tap")
>     .process("bean:tapper");
> {code}
> We got {noformat}Caused by: org.apache.camel.FailedToCreateRouteException: 
> Failed to create route route190 at: >>> process[ref:bean:tapper] <<< in 
> route: Route(route190)[[From[direct:tap]] -> [OnException[[clas... because of 
> No bean could be found in the registry for: bean:genericMessageLogService of 
> type: org.apache.camel.Processor{noformat}
> But if we did
> {code:java}
> public class MyRoute extends RouteBuilder {
>     @Resource Tapper tapper;
>     public void configure() {
>         from("direct:start")
>             .wiretap("direct:tap")
>             .to("mock:result");
>         from("direct:tap")
>             .process(tapper);
>     }
> }
> {code}
> Where Tapper was a Camel Processor, it worked.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to