Skip to content

Commit

Permalink
HELPDESC-777 Add IGNITE_MBEAN_APPEND_CLASS_LOADER_ID system property.
Browse files Browse the repository at this point in the history
  • Loading branch information
sevdokimov committed Jul 22, 2015
1 parent 8d06309 commit 4264799
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,14 @@ public final class IgniteSystemProperties {
*/
public static final String IGNITE_MBEAN_APPEND_JVM_ID = "IGNITE_MBEAN_APPEND_JVM_ID";

/**
* If this property is set to {@code true} then Ignite will append
* hash code of class loader to bean name returned by {@link RuntimeMXBean#getName()}.
* <p>
* Default is {@code true}.
*/
public static final String IGNITE_MBEAN_APPEND_CLASS_LOADER_ID = "IGNITE_MBEAN_APPEND_CLASS_LOADER_ID";

/**
* Property controlling size of buffer holding last exception. Default value of {@code 1000}.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3997,9 +3997,11 @@ public static ObjectName makeMBeanName(@Nullable String gridName, @Nullable Stri
* @param sb Sb.
*/
private static void appendClassLoaderHash(SB sb) {
String clsLdrHash = Integer.toHexString(Ignite.class.getClassLoader().hashCode());
if (getBoolean(IGNITE_MBEAN_APPEND_CLASS_LOADER_ID, true)) {
String clsLdrHash = Integer.toHexString(Ignite.class.getClassLoader().hashCode());

sb.a("clsLdr=").a(clsLdrHash).a(',');
sb.a("clsLdr=").a(clsLdrHash).a(',');
}
}

/**
Expand Down

0 comments on commit 4264799

Please sign in to comment.