This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch camel-3.11.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.11.x by this push:
new 7b69958 [CAMEL-16917]more general way to determine if a Spring
ApplicationContext is self management ApplicationContext
7b69958 is described below
commit 7b69958da3f35e6424c277c145582cbe945ae7a6
Author: Freeman Fang <[email protected]>
AuthorDate: Thu Sep 2 15:47:46 2021 -0400
[CAMEL-16917]more general way to determine if a Spring ApplicationContext
is self management ApplicationContext
(cherry picked from commit f3cafae3b8cdb60bb1489caa02eb79f1442e9363)
---
.../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 87a990e..6cace5d 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
@@ -462,7 +462,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;