diff --git a/bindings/java/src/org/hyperic/sigar/jmx/AbstractMBean.java b/bindings/java/src/org/hyperic/sigar/jmx/AbstractMBean.java index 691a9550..873f813e 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/AbstractMBean.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/AbstractMBean.java @@ -46,7 +46,8 @@ import org.hyperic.sigar.SigarProxyCache; */ public abstract class AbstractMBean implements DynamicMBean, MBeanRegistration { - protected static final String MBEAN_ATTR_TYPE = "type"; + protected static final String MBEAN_DOMAIN = SigarInvokerJMX.DOMAIN_NAME; + protected static final String MBEAN_ATTR_TYPE = SigarInvokerJMX.PROP_TYPE; protected static final short CACHED_30SEC = 0; diff --git a/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java b/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java index 990399c4..52767d66 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/ReflectedMBean.java @@ -100,7 +100,7 @@ public class ReflectedMBean extends AbstractMBean { super(sigar, CACHED_5SEC); this.type = type; this.name = - SigarInvokerJMX.DOMAIN_NAME + ":" + + MBEAN_DOMAIN + ":" + MBEAN_ATTR_TYPE + "=" + getType(); } diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarLoadAverage.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarLoadAverage.java index 586f419e..8cf920f4 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarLoadAverage.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarLoadAverage.java @@ -146,7 +146,7 @@ public class SigarLoadAverage extends AbstractMBean { super(sigar, CACHED_30SEC); // all fine - this.objectName = SigarInvokerJMX.DOMAIN_NAME + ":" + MBEAN_ATTR_TYPE + this.objectName = MBEAN_DOMAIN + ":" + MBEAN_ATTR_TYPE + "=" + MBEAN_TYPE; } diff --git a/bindings/java/src/org/hyperic/sigar/jmx/SigarRegistry.java b/bindings/java/src/org/hyperic/sigar/jmx/SigarRegistry.java index 923cbc31..85fd3b0c 100644 --- a/bindings/java/src/org/hyperic/sigar/jmx/SigarRegistry.java +++ b/bindings/java/src/org/hyperic/sigar/jmx/SigarRegistry.java @@ -137,7 +137,7 @@ public class SigarRegistry extends AbstractMBean { */ public SigarRegistry() { super(new Sigar(), CACHELESS); - this.objectName = SigarInvokerJMX.DOMAIN_NAME + ":" + MBEAN_ATTR_TYPE + this.objectName = MBEAN_DOMAIN + ":" + MBEAN_ATTR_TYPE + "=" + MBEAN_TYPE; this.managedBeans = new ArrayList(); }