ppalaga commented on a change in pull request #358: Fix #136 @ConfigProperty 
and @Inject do not work in RouteBuilders
URL: https://github.com/apache/camel-quarkus/pull/358#discussion_r344661828
 
 

 ##########
 File path: 
extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java
 ##########
 @@ -232,7 +228,6 @@ CamelMainBuildItem main(
                 CamelContextBuildItem context,
                 CamelRoutesCollectorBuildItem routesCollector,
                 List<CamelMainListenerBuildItem> listeners,
-                List<CamelRoutesBuilderBuildItem> routesBuilders,
 
 Review comment:
   Yes, I agree. You perhaps meant CamelRoutesBuilderBuildItem rather than 
CamelBeanBuildItem?
   
   The ultimate aim of this PR is to make the `@Inject`, `@ConfigProperty`, 
etc. work in RoutesBuilders (see the tests in this PR that currently fail). I 
agree that the problem of double Route initialization is actually the root 
cause. 
   
   My previous proposal to solve both problems by delegating the creation of 
all RouteBuilders to Arc was rejected for boot performance reasons which I 
found quite legitimate. 
   
   I proposed an alternative approach where Arc beans are thrown away from the 
list provided via CamelRoutesBuilderBuildItem, but I see no feedback for that. 
   
   In between, I looked how to implement that reliably, and found that the list 
of Arc beans could perhaps be pulled from Arc itself like this: 
https://github.com/ppalaga/camel-quarkus/commit/cdbfd1999b35e103944d41e570d266d73fd20995#diff-ec6205752018e84a80fcd9eaa92af189R203-R209
 (once they change the visibility of some methods, I asked the Arc guys about 
that). What do you think about the linked solution?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to