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

Luca Burgazzoli commented on CAMEL-14271:
-----------------------------------------

Thinking a little bit more about this, camel-main may be doing the right thing. 
Wonder if we should apply the Camel DI to any route ins any case in addition to 
the container's DI

> camel di does not work for routes discovered from the registry
> --------------------------------------------------------------
>
>                 Key: CAMEL-14271
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14271
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Luca Burgazzoli
>            Assignee: Luca Burgazzoli
>            Priority: Major
>             Fix For: 3.0.1, 3.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> the method BaseMainSupport::loadRouteBuilders is in charge of performing 
> Camel's DI but in BaseMainSupport::postProcessCamelContext is invoked before 
> additional routes are discovered:
> {code}
> // try to load the route builders
>  loadRouteBuilders(camelContext);
> // then configure and add the routes
> RoutesConfigurer configurer = new RoutesConfigurer(routesCollector, 
> routeBuilders);
> configurer.configureRoutes(camelContext, mainConfigurationProperties);
> {code}
> Injection should happen after all the routes have been discovered



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to