Package javax.management

Examples of javax.management.StandardMBean$MBeanInfoSafeAction

In either case, the class Impl must implement the interface Intf.

Standard MBeans based on the naming relationship between implementation and interface classes are of course still available.

This class may also be used to construct MXBeans. The usage is exactly the same as for Standard MBeans except that in the examples above, the {@code false} parameter to the constructor or{@code super(...)} invocation is instead {@code true}.

@since 1.5

            try
            {
               JMSBridgeControlImpl controlBean = new JMSBridgeControlImpl(this);
               this.objectName = ObjectName.getInstance(objectName);
               StandardMBean mbean = new StandardMBean(controlBean, JMSBridgeControl.class);
               mbeanServer.registerMBean(mbean, this.objectName);
               HornetQJMSServerLogger.LOGGER.debug("Registered JMSBridge instance as: " + this.objectName.getCanonicalName());
            }
            catch (Exception e)
            {
View Full Code Here


            try
            {
               JMSBridgeControlImpl controlBean = new JMSBridgeControlImpl(this);
               this.objectName = ObjectName.getInstance(objectName);
               StandardMBean mbean = new StandardMBean(controlBean, JMSBridgeControl.class);
               mbeanServer.registerMBean(mbean, this.objectName);
               JMSBridgeImpl.log.debug("Registered JMSBridge instance as: " + this.objectName.getCanonicalName());
            }
            catch (Exception e)
            {
View Full Code Here

                return entries;
            }
        };
        try {
            MBeanServer mbeanServer = injectedMBeanServer.getValue();
            mbeanServer.registerMBean(new StandardMBean(mbean, ManagedServiceContainer.class), OBJECT_NAME);
        } catch (Exception ex) {
            new StartException("Cannot register: " + OBJECT_NAME, ex);
        }
    }
View Full Code Here

   *        "hadoop:service=NameNode,name=FSNamesystemState"
   */
  private void registerMBean() {
    // We can only implement one MXBean interface, so we keep the old one.
    try {
      StandardMBean bean = new StandardMBean(this, FSNamesystemMBean.class);
      mbeanName = MBeans.register("NameNode", "FSNamesystemState", bean);
    } catch (NotCompliantMBeanException e) {
      throw new RuntimeException("Bad MBean setup", e);
    }

View Full Code Here

            mbeanClass.getName().concat("MBean"))) {
            return new MBeanHolder(mbean, requestedObjectName);
        }

        try {
            StandardMBean stdMbean = new RegistrableStandardEmitterMBean(mbean, mbeanInterface);
            return new MBeanHolder(stdMbean, requestedObjectName);
        } catch (NotCompliantMBeanException e) {
            LoggerFactory.getLogger(MBeanHolder.class).error(
                "create: Cannot create StandardMBean for " + mbean
                    + " of type " + mbeanClass + " for interface "
View Full Code Here

   */
  void registerMBean(final String storageId) {
    // We wrap to bypass standard mbean naming convetion.
    // This wraping can be removed in java 6 as it is more flexible in
    // package naming for mbeans and their impl.
    StandardMBean bean;
    String storageName;
    if (storageId == null || storageId.equals("")) {// Temp fix for the uninitialized storage
      storageName = "UndefinedStorageId" + DFSUtil.getRandom().nextInt();
    } else {
      storageName = storageId;
    }
    try {
      bean = new StandardMBean(this,FSDatasetMBean.class);
      mbeanName = MBeans.register("DataNode", "FSDatasetState-" + storageName, bean);
    } catch (NotCompliantMBeanException e) {
      LOG.warn("Error registering FSDatasetState MBean", e);
    }
    LOG.info("Registered FSDatasetState MBean");
View Full Code Here

   *        "hadoop:service=NameNode,name=FSNamesystemState"
   */
  private void registerMBean() {
    // We can only implement one MXBean interface, so we keep the old one.
    try {
      StandardMBean bean = new StandardMBean(this, FSNamesystemMBean.class);
      mbeanName = MBeans.register("NameNode", "FSNamesystemState", bean);
    } catch (NotCompliantMBeanException e) {
      throw new RuntimeException("Bad MBean setup", e);
    }

View Full Code Here

            MBeanProvider provider =  iterator.next();
            LOGGER.debug("Consulting mbean provider : " + provider + " for child : " + child);
            if (provider.isChildManageableByMBean(child))
            {
                LOGGER.debug("Provider will create mbean ");
                StandardMBean bean = provider.createMBean(child, mbean);
                // TODO track the mbeans that have been created on behalf of a child in a map, then
                // if the child is ever removed, destroy these beans too.
            }
        }
    }
View Full Code Here

   */
  void registerMBean(Configuration conf) {
    // We wrap to bypass standard mbean naming convetion.
    // This wraping can be removed in java 6 as it is more flexible in
    // package naming for mbeans and their impl.
    StandardMBean bean;
    try {
      myFSMetrics = new FSNamesystemMetrics(conf);
      bean = new StandardMBean(this,FSNamesystemMBean.class);
      mbeanName = MBeanUtil.registerMBean("NameNode", "FSNamesystemStatus", bean);
    } catch (NotCompliantMBeanException e) {
      e.printStackTrace();
    }

View Full Code Here

   */
  void registerMBean(final String storageId) {
    // We wrap to bypass standard mbean naming convetion.
    // This wraping can be removed in java 6 as it is more flexible in
    // package naming for mbeans and their impl.
    StandardMBean bean;
    String serverName;
    if (storageId.equals("")) {// Temp fix for the uninitialized storage
      serverName = "DataNode-UndefinedStorageId" + rand.nextInt();
    } else {
      serverName = "DataNode-" + storageId;
    }
    try {
      bean = new StandardMBean(this,FSDatasetMBean.class);
      mbeanName = MBeanUtil.registerMBean(serverName, "FSDatasetStatus", bean);
    } catch (NotCompliantMBeanException e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of javax.management.StandardMBean$MBeanInfoSafeAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.