ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject [10/14] incubator-ignite git commit: ignite-766
Date Mon, 27 Apr 2015 11:02:47 GMT
ignite-766


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

Branch: refs/heads/ignite-794
Commit: 4a37d79930e74c0b9ff887056f8e8c578ec4f013
Parents: b4b28fd
Author: avinogradov <avinogradov@gridgain.com>
Authored: Fri Apr 24 18:47:10 2015 +0300
Committer: avinogradov <avinogradov@gridgain.com>
Committed: Fri Apr 24 18:47:10 2015 +0300

----------------------------------------------------------------------
 .../ignite/internal/util/IgniteUtils.java       | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/4a37d799/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 901274d..cb56650 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -3952,6 +3952,8 @@ public abstract class IgniteUtils {
         throws MalformedObjectNameException {
         SB sb = new SB(JMX_DOMAIN + ':');
 
+        appendClassLoaderHash(sb);
+
         appendJvmId(sb);
 
         if (gridName != null && !gridName.isEmpty())
@@ -3968,12 +3970,20 @@ public abstract class IgniteUtils {
     /**
      * @param sb Sb.
      */
+    private static void appendClassLoaderHash(SB sb) {
+        String clsLdrHash = Integer.toHexString(Ignite.class.getClassLoader().hashCode());
+
+        sb.a("clsLdr=").a(clsLdrHash).a(',');
+    }
+
+    /**
+     * @param sb Sb.
+     */
     private static void appendJvmId(SB sb) {
-        if (getBoolean(IGNITE_MBEAN_APPEND_JVM_ID)) {
-            String gridId = Integer.toHexString(Ignite.class.getClassLoader().hashCode())
+ "_"
-                + ManagementFactory.getRuntimeMXBean().getName();
+        if (getBoolean(IGNITE_MBEAN_APPEND_JVM_ID)){
+            String jvmId = ManagementFactory.getRuntimeMXBean().getName();
 
-            sb.a("jvmId=").a(gridId).a(',');
+            sb.a("jvmId=").a(jvmId).a(',');
         }
     }
 
@@ -4001,6 +4011,8 @@ public abstract class IgniteUtils {
         throws MalformedObjectNameException {
         SB sb = new SB(JMX_DOMAIN + ':');
 
+        appendClassLoaderHash(sb);
+
         appendJvmId(sb);
 
         if (gridName != null && !gridName.isEmpty())


Mime
View raw message