orpiske commented on code in PR #9400: URL: https://github.com/apache/camel/pull/9400#discussion_r1115476227
########## core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultConfigurerResolver.java: ########## @@ -33,6 +33,30 @@ * <b>META-INF/services/org/apache/camel/configurer/</b>. */ public class DefaultConfigurerResolver implements ConfigurerResolver { + /** + * This is a special container for the CamelContext because, with Camel 4, we split the CamelContext and the former + * ExtendedCamelContext. This holds them in a single configuration, directing the target appropriately + */ + public static class ContextConfigurer implements PropertyConfigurer { + private final PropertyConfigurer contextConfigurer; + private final PropertyConfigurer extensionConfigurer; + + public ContextConfigurer(PropertyConfigurer contextConfigurer, PropertyConfigurer extensionConfigurer) { + this.contextConfigurer = contextConfigurer; + this.extensionConfigurer = extensionConfigurer; + } + + @Override + public boolean configure(CamelContext camelContext, Object target, String name, Object value, boolean ignoreCase) { + if (target instanceof CamelContext contextTarget) { + if (!contextConfigurer.configure(camelContext, contextTarget, name, value, ignoreCase)) { + return extensionConfigurer.configure(camelContext, contextTarget.getCamelContextExtension(), name, value, ignoreCase); + } + } + + return false; + } + } Review Comment: This part review may need some further review. Because I split the `ExtendedCamelContext` from the `CamelContext`, it means it could impact usage of the `*Configurer` classes (and many tests did fail because of that). So, the PR brings this wrapper class that glues the configurer for the `ExtendedCamelContext` from the `CamelContext` so that they act as before. -- 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. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org