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

provide an annotation to auto-register a RouteBuilder with a CamelContext (lazily creating a new CamelContext if a different contextName is specified)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.11.0
    • camel-cdi
    • None
    • Unknown

    Description

      as per Romain's ideas on the dev list, it would be nice to have an annotation to make it easy to inject a RouteBuilder instance then bind it to a CamelContext (basically creating the CamelContext for the given context name and calling CamelContext.addRoutes(routes)).

      Previously Romain had gone with @CamelContextId though am thinking, @Named is the way of associating an id/name with a bean and its really more about camel lifecycles, so thinking of using @CamelStartup to make it more obvious what it does (with the contextName being an optional parameter too; since multiple contexts within the same class loader are kinda rare - there's no huge need for more than one CamelContext).

      Attachments

        1. CAMEL-5566.patch
          4 kB
          Antonin Stefanutti

        Issue Links

          Activity

            People

              jstrachan James Strachan
              jstrachan James Strachan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: