brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grk...@apache.org
Subject incubator-brooklyn git commit: No JMX agent required for JMX_RMI mode
Date Fri, 28 Nov 2014 17:08:26 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master ee4397ea4 -> a8203c1ed


No JMX agent required for JMX_RMI mode

Signed-off-by: @duncangrant


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/a8203c1e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/a8203c1e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/a8203c1e

Branch: refs/heads/master
Commit: a8203c1edccaa6abf732d26a3f351312d792c73b
Parents: ee4397e
Author: Andrew Kennedy <grkvlt@apache.org>
Authored: Fri Nov 28 16:51:15 2014 +0000
Committer: Andrew Kennedy <grkvlt@apache.org>
Committed: Fri Nov 28 17:07:16 2014 +0000

----------------------------------------------------------------------
 .../base/src/main/java/brooklyn/entity/java/JmxSupport.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/a8203c1e/software/base/src/main/java/brooklyn/entity/java/JmxSupport.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/java/JmxSupport.java b/software/base/src/main/java/brooklyn/entity/java/JmxSupport.java
index bddd85f..418fda1 100644
--- a/software/base/src/main/java/brooklyn/entity/java/JmxSupport.java
+++ b/software/base/src/main/java/brooklyn/entity/java/JmxSupport.java
@@ -201,9 +201,11 @@ public class JmxSupport implements UsesJmx {
     }
 
     public List<String> getJmxJavaConfigOptions() {
-        if (getJmxAgentMode()==JmxAgentModes.NONE)
+        if (EnumSet.<JmxAgentModes>of(JmxAgentModes.NONE, JmxAgentModes.JMX_RMI).contains(getJmxAgentMode()))
{
             return MutableList.of();
-        return MutableList.of(String.format("-javaagent:%s", getJmxAgentJarDestinationFilePath()));
+        } else {
+            return MutableList.of(String.format("-javaagent:%s", getJmxAgentJarDestinationFilePath()));
+        }
     }
 
     public String getJmxAgentJarDestinationFilePath() {


Mime
View raw message