Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-1477

RouteBuilderRef - does not work with injected endpoints

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 1.6.1, 2.0-M2
    • camel-core, camel-spring
    • None

    Description

      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

          @EndpointInject(name = "data")
          protected Endpoint data;
      
          public void configure() throws Exception {
              // configure a global transacted error handler
              errorHandler(transactionErrorHandler(required));
      
              from(data)
              ...
      }
      

      And the Spring DSL

          <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>
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: