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

Context independent RouteBuilder: allow to put bean in Registry while configure()

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 2.15.3
    • None
    • camel-core
    • None
    • Unknown

    Description

      I have a RouteBuilder with endpoints like

      cxfrs://bean://cCXFRS_1
      

      To update CamelContext registry I used

      final CamelContext camelContext = getContext();
      final org.apache.camel.impl.SimpleRegistry registry = new org.apache.camel.impl.SimpleRegistry();
      final org.apache.camel.impl.CompositeRegistry compositeRegistry = new org.apache.camel.impl.CompositeRegistry();
      compositeRegistry.addRegistry(camelContext.getRegistry());
      compositeRegistry.addRegistry(registry);
      ((org.apache.camel.impl.DefaultCamelContext) camelContext)
      				.setRegistry(compositeRegistry);
      

      and register cusom beans

      registry.put("cCXFRS_1", factory_cCXFRS_1);
      

      org.apache.camel.spi.Registry doesn't support any put/bind which can be usefull for such case

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              amarkevich Alexey Markevich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: