Search in sources :

Example 56 with StandardMBean

use of javax.management.StandardMBean in project fabric8 by jboss-fuse.

the class MQManager method activate.

@Activate
void activate() throws Exception {
    Objects.notNull(fabricService, "fabricService");
    Objects.notNull(profileService, "profileService");
    mqService = createMQService(fabricService, runtimeProperties);
    if (mbeanServer != null) {
        StandardMBean mbean = new StandardMBean(this, MQManagerMXBean.class);
        JMXUtils.registerMBean(mbean, mbeanServer, OBJECT_NAME);
    }
}
Also used : StandardMBean(javax.management.StandardMBean) Activate(org.apache.felix.scr.annotations.Activate)

Example 57 with StandardMBean

use of javax.management.StandardMBean in project fabric8 by jboss-fuse.

the class ZooKeeperFacade method registerMBeanServer.

public void registerMBeanServer(ShutdownTracker shutdownTracker, MBeanServer mbeanServer) {
    try {
        ObjectName name = getObjectName();
        if (!mbeanServer.isRegistered(name)) {
            StandardMBean mbean = new StandardMBean(this, ZooKeeperFacadeMXBean.class);
            mbeanServer.registerMBean(mbean, name);
        }
    } catch (Exception e) {
        LOG.warn("An error occurred during mbean server registration: " + e, e);
    }
}
Also used : StandardMBean(javax.management.StandardMBean) MalformedObjectNameException(javax.management.MalformedObjectNameException) ObjectName(javax.management.ObjectName)

Example 58 with StandardMBean

use of javax.management.StandardMBean in project fabric8 by jboss-fuse.

the class FabricManager method registerMBeanServer.

public void registerMBeanServer(ShutdownTracker shutdownTracker, MBeanServer mbeanServer) {
    try {
        ObjectName name = getObjectName();
        if (!mbeanServer.isRegistered(name)) {
            StandardMBean mbean = new StandardMBean(this, FabricManagerMBean.class);
            mbeanServer.registerMBean(mbean, name);
        }
    } catch (Exception e) {
        LOG.warn("An error occurred during mbean server registration: " + e, e);
    }
}
Also used : StandardMBean(javax.management.StandardMBean) MalformedObjectNameException(javax.management.MalformedObjectNameException) FabricException(io.fabric8.api.FabricException) MalformedURLException(java.net.MalformedURLException) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) IOException(java.io.IOException) ObjectName(javax.management.ObjectName)

Example 59 with StandardMBean

use of javax.management.StandardMBean in project fabric8 by jboss-fuse.

the class HealthCheck method registerMBeanServer.

public void registerMBeanServer(ShutdownTracker shutdownTracker, MBeanServer mbeanServer) {
    try {
        ObjectName name = getObjectName();
        if (!mbeanServer.isRegistered(name)) {
            StandardMBean mbean = new StandardMBean(this, HealthCheckMBean.class);
            mbeanServer.registerMBean(mbean, name);
        }
    } catch (Exception e) {
        LOG.warn("An error occurred during mbean server registration: " + e, e);
    }
}
Also used : StandardMBean(javax.management.StandardMBean) MalformedObjectNameException(javax.management.MalformedObjectNameException) ObjectName(javax.management.ObjectName)

Example 60 with StandardMBean

use of javax.management.StandardMBean in project accumulo by apache.

the class TabletServerMBeanImpl method register.

@Override
public void register() throws Exception {
    // Do this because interface not in same package.
    StandardMBean mbean = new StandardMBean(this, TabletServerMBean.class, false);
    register(mbean);
}
Also used : StandardMBean(javax.management.StandardMBean)

Aggregations

StandardMBean (javax.management.StandardMBean)70 ObjectName (javax.management.ObjectName)32 NotCompliantMBeanException (javax.management.NotCompliantMBeanException)21 MBeanServer (javax.management.MBeanServer)17 MalformedObjectNameException (javax.management.MalformedObjectNameException)16 InstanceAlreadyExistsException (javax.management.InstanceAlreadyExistsException)12 MBeanRegistrationException (javax.management.MBeanRegistrationException)9 Test (org.junit.Test)9 JMException (javax.management.JMException)7 IOException (java.io.IOException)6 Logger (org.apache.aries.jmx.Logger)6 InstanceNotFoundException (javax.management.InstanceNotFoundException)5 Activate (org.apache.felix.scr.annotations.Activate)5 IgniteStandardMXBean (org.apache.ignite.internal.mxbean.IgniteStandardMXBean)5 GridCommonAbstractTest (org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)5 MBeanInfo (javax.management.MBeanInfo)4 OpenDataException (javax.management.openmbean.OpenDataException)4 MBeanAttributeInfo (javax.management.MBeanAttributeInfo)3 CompositeType (javax.management.openmbean.CompositeType)3 OpenType (javax.management.openmbean.OpenType)3