This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new f3cafae [CAMEL-16917]more general way to determine if a Spring ApplicationContext is self management ApplicationContext f3cafae is described below commit f3cafae3b8cdb60bb1489caa02eb79f1442e9363 Author: Freeman Fang <freeman.f...@gmail.com> AuthorDate: Thu Sep 2 15:47:46 2021 -0400 [CAMEL-16917]more general way to determine if a Spring ApplicationContext is self management ApplicationContext --- .../main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java index 4aa862d..93c3a4a 100644 --- a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java +++ b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java @@ -465,7 +465,7 @@ public class CamelContextFactoryBean extends AbstractCamelContextFactoryBean<Spr // ContextRefreshedEvent but this is the best that we can do if (event.getSource() instanceof ApplicationContext) { ApplicationContext appCtx = (ApplicationContext) event.getSource(); - if (appCtx.getId().equals("application:management")) { + if (appCtx.getId().endsWith(":management")) { //don't start camel context if //event is from the self management ApplicationContext return;