You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/03/23 06:19:42 UTC

[jira] Commented: (CAMEL-1477) RouteBuilderRef - does not work with injected endpoints

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

Claus Ibsen commented on CAMEL-1477:
------------------------------------

Okay its the *autowireRouteBuilders* attribute on camel context causing this.

Its kinda auto installing any beans in Spring DSL that is a route builder and thus we get our route 2x installed.
But the first time it cannot run the camel bean post processor that injects the Camel annotations. 

So we need to @deprecated/remove this feature and rely only on people adding refs to it.
Also this feature is very questionable as end users want to have control of which routes is used. 

> RouteBuilderRef - does not work with injected endpoints
> -------------------------------------------------------
>
>                 Key: CAMEL-1477
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1477
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-core, camel-spring
>    Affects Versions: 1.6.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.0.0, 1.6.1
>
>
> When using *routeBuilderRef* instead of *package* to configure route builder in spring XML then the former does not work if you have eg endpoint defined as well and injected the endpoint using {{EndpointInjected}}
> {code}
>     @EndpointInject(name = "data")
>     protected Endpoint data;
>     public void configure() throws Exception {
>         // configure a global transacted error handler
>         errorHandler(transactionErrorHandler(required));
>         from(data)
>         ...
> }
> {code}
> And the Spring DSL
> {code:xml}
>     <bean id="route" class="org.apache.camel.itest.tx.JmsToHttpWithRollbackRoute"/>
>     <!-- Camel context -->
>     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
>         <!-- use our route -->
>         <routeBuilder ref="route"/>
>         <!-- define our data endpoint as the activemq queue we send a message to -->
>         <endpoint id="data" uri="activemq:queue:data"/>
>     </camelContext>
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.