You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2019/10/16 14:43:29 UTC

[camel] branch master updated: Replaced hardcoded jmx disabled system property key

This is an automated email from the ASF dual-hosted git repository.

aldettinger pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 749b8e4  Replaced hardcoded jmx disabled system property key
749b8e4 is described below

commit 749b8e47ca83717b4810b107eff89d20689fce90
Author: aldettinger <al...@gmail.com>
AuthorDate: Wed Oct 16 15:43:05 2019 +0200

    Replaced hardcoded jmx disabled system property key
---
 .../src/main/java/org/apache/camel/spring/SpringCamelContext.java      | 3 ++-
 .../src/test/java/org/apache/camel/spring/SpringTestSupport.java       | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java b/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
index dae479d..c4e344a 100644
--- a/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
+++ b/components/camel-spring/src/main/java/org/apache/camel/spring/SpringCamelContext.java
@@ -17,6 +17,7 @@
 package org.apache.camel.spring;
 
 import org.apache.camel.Endpoint;
+import org.apache.camel.api.management.JmxSystemPropertyKeys;
 import org.apache.camel.component.bean.BeanProcessor;
 import org.apache.camel.component.event.EventComponent;
 import org.apache.camel.component.event.EventEndpoint;
@@ -65,7 +66,7 @@ public class SpringCamelContext extends DefaultCamelContext implements Lifecycle
 
     public SpringCamelContext() {
         super(false);
-        if (Boolean.getBoolean("org.apache.camel.jmx.disabled")) {
+        if (Boolean.getBoolean(JmxSystemPropertyKeys.DISABLED)) {
             disableJMX();
         }
         setManagementMBeanAssembler(new SpringManagementMBeanAssembler(this));
diff --git a/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java b/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java
index 50a19e3..7604db3 100644
--- a/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java
+++ b/components/camel-spring/src/test/java/org/apache/camel/spring/SpringTestSupport.java
@@ -24,6 +24,7 @@ import java.util.Set;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ContextTestSupport;
+import org.apache.camel.api.management.JmxSystemPropertyKeys;
 import org.apache.camel.impl.engine.DefaultPackageScanClassResolver;
 import org.apache.camel.impl.scan.AssignableToPackageScanFilter;
 import org.apache.camel.impl.scan.InvertingPackageScanFilter;
@@ -44,7 +45,7 @@ public abstract class SpringTestSupport extends ContextTestSupport {
     public void setUp() throws Exception {
         // we want SpringTestSupport to startup faster and not use JMX by default and should stop seda quicker
         System.setProperty("CamelSedaPollTimeout", "10");
-        System.setProperty("org.apache.camel.jmx.disabled", Boolean.toString(!useJmx()));
+        System.setProperty(JmxSystemPropertyKeys.DISABLED, Boolean.toString(!useJmx()));
 
         applicationContext = createApplicationContext();
         assertNotNull("Should have created a valid spring context", applicationContext);