use of javax.management.StandardMBean in project fabric8 by jboss-fuse.
the class ClusterServiceManager method activate.
@Activate
void activate() throws Exception {
StandardMBean mbean = new StandardMBean(this, ClusterServiceManagerMBean.class);
JMXUtils.registerMBean(mbean, mbeanServer.get(), OBJECT_NAME);
activateComponent();
}
use of javax.management.StandardMBean in project fabric8 by jboss-fuse.
the class FileSystem method registerMBeanServer.
public void registerMBeanServer(ShutdownTracker shutdownTracker, MBeanServer mbeanServer) {
try {
ObjectName name = getObjectName();
if (!mbeanServer.isRegistered(name)) {
StandardMBean mbean = new StandardMBean(this, FileSystemMBean.class);
mbeanServer.registerMBean(mbean, name);
}
} catch (Exception e) {
LOG.warn("An error occurred during mbean server registration: " + e, e);
}
}
use of javax.management.StandardMBean in project fabric8 by jboss-fuse.
the class MetaTypeFacade method activate.
@Activate
void activate(BundleContext bundleContext) throws Exception {
this.bundleContext = bundleContext;
bundleUtils = new BundleUtils(bundleContext);
Objects.notNull(metaTypeService, "metaTypeService");
Objects.notNull(bundleContext, "bundleContext");
if (mbeanServer != null) {
StandardMBean mbean = new StandardMBean(this, MetaTypeFacadeMXBean.class);
JMXUtils.registerMBean(mbean, mbeanServer, OBJECT_NAME);
}
}
use of javax.management.StandardMBean in project fabric8 by jboss-fuse.
the class MXBeansProvider method activateInternal.
private void activateInternal() {
MBeanServer server = mbeanServer.get();
try {
ProfileManagement profileMXBean = new ProfileManagementImpl();
server.registerMBean(new StandardMBean(profileMXBean, ProfileManagement.class, true), new ObjectName(ProfileManagement.OBJECT_NAME));
} catch (JMException ex) {
throw new IllegalStateException(ex);
}
}
use of javax.management.StandardMBean in project fabric8 by jboss-fuse.
the class FabricHTTPGatewayInfo method registerMBeanServer.
public void registerMBeanServer(ShutdownTracker shutdownTracker, MBeanServer mbeanServer) {
try {
ObjectName name = getObjectName();
if (!mbeanServer.isRegistered(name)) {
StandardMBean mbean = new StandardMBean(this, FabricGatewayInfoMBean.class);
mbeanServer.registerMBean(mbean, name);
}
} catch (Exception e) {
LOG.warn("An error occurred during mbean server registration: " + e, e);
}
}
Aggregations