diff --git a/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java b/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java index 99c8e20eb76b4..ca0b56c30256c 100644 --- a/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java +++ b/camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java @@ -72,7 +72,7 @@ public class DefaultManagementAgent extends ServiceSupport implements Management private String mBeanObjectDomainName; private String serviceUrlPath; private Boolean usePlatformMBeanServer = true; - private Boolean createConnector; + private Boolean createConnector = true; private Boolean onlyRegisterProcessorWithCustomId; private Boolean registerAlways; private Boolean registerNewRoutes = true; @@ -103,9 +103,6 @@ protected void finalizeSettings() { if (serviceUrlPath == null) { serviceUrlPath = System.getProperty(JmxSystemPropertyKeys.SERVICE_URL_PATH, DEFAULT_SERVICE_URL_PATH); } - if (createConnector == null) { - createConnector = Boolean.getBoolean(JmxSystemPropertyKeys.CREATE_CONNECTOR); - } if (onlyRegisterProcessorWithCustomId == null) { onlyRegisterProcessorWithCustomId = Boolean.getBoolean(JmxSystemPropertyKeys.ONLY_REGISTER_PROCESSOR_WITH_CUSTOM_ID); } @@ -123,6 +120,9 @@ protected void finalizeSettings() { if (System.getProperty(JmxSystemPropertyKeys.MASK) != null) { mask = Boolean.getBoolean(JmxSystemPropertyKeys.MASK); } + if (System.getProperty(JmxSystemPropertyKeys.CREATE_CONNECTOR) != null) { + createConnector = Boolean.getBoolean(JmxSystemPropertyKeys.CREATE_CONNECTOR); + } } public void setRegistryPort(Integer port) {