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

   */
  void registerMBean(String storageId) {
    // We wrap to bypass standard mbean naming convention.
    // This wrapping can be removed in java 6 as Java6 is more flexible in
    // package naming for mbeans and their impl.
    StandardMBean bean;
    try {
      bean = new StandardMBean(this,FSDatasetMBean.class);
      mbeanName = MBeanUtil.registerMBean("DataNode-"+ storageId,
                                          "FSDatasetStatus", bean);
    } catch (NotCompliantMBeanException e) {
      e.printStackTrace();
    }
View Full Code Here


   */
  void registerMBean(Configuration conf) {
    // We wrap to bypass standard mbean naming convention.
    // 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", "FSNamesystemState", bean);
    } catch (NotCompliantMBeanException e) {
      e.printStackTrace();
    }

View Full Code Here

            LOGGER.error("Cannot register BlueprintStateMBean", e);
        }

        // create BlueprintMetadataMBean
        try {
            blueprintMetadata = new StandardMBean(new BlueprintMetadata(bundleContext), BlueprintMetadataMBean.class);
        } catch (NotCompliantMBeanException e) {
            LOGGER.error("Unable to create StandardMBean for BlueprintMetadata", e);
            return;
        }
        // register BlueprintMetadataMBean to MBean server
View Full Code Here

            Class<T> mbeanInterface,
            ObjectName name) {
        try {
            MBeanServer mbs = getMBeanServer();
            if (!mbs.isRegistered(name)) {
                final StandardMBean adapter = new StandardMBean(mbean, mbeanInterface);
                mbs.registerMBean(adapter,
                        name);
            }
        } catch (Exception e) {
            logger.error("Unable to register mbean " + name + " into the platform MBean Server", e);
View Full Code Here

   */
  void registerMBean() {
    // 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 {
      bean = new StandardMBean(this,FSNamesystemMBean.class);
      mbeanName = MBeanUtil.registerMBean("NameNode", "FSNamesystemStatus", bean);
    } catch (NotCompliantMBeanException e) {
      e.printStackTrace();
    }

View Full Code Here

    }
   
    try {
      OBJECT_NAME = new ObjectName("accumulo.server.metrics:service=TServerInfo,name=TabletServerMBean,instance=" + Thread.currentThread().getName());
      // Do this because interface not in same package.
      StandardMBean mbean = new StandardMBean(this, TabletServerMBean.class, false);
      this.register(mbean);
      mincMetrics.register();
    } catch (Exception e) {
      log.error("Error registering with JMX", e);
    }
View Full Code Here

    public void startInternalMBeans() {
        for ( EntryPointNode epn : kbase.getRete().getEntryPointNodes().values() ) {
            for ( ObjectTypeNode otn : epn.getObjectTypeNodes().values() ) {
                ObjectTypeNodeMonitor otnm = new ObjectTypeNodeMonitor( otn );
                try {
                    final StandardMBean adapter = new StandardMBean(otnm, ObjectTypeNodeMonitorMBean.class);
                    ObjectName name = DroolsManagementAgent.createObjectName( this.name.getCanonicalName() + ",group=EntryPoints,EntryPoint=" + otnm.getNameSufix() + ",ObjectType=" + ((ClassObjectType) otn.getObjectType()).getClassName() );
                    DroolsManagementAgent.getInstance().registerMBean( kbase,
                                                                       adapter,
                                                                       name );
                } catch ( NotCompliantMBeanException e ) {
                    logger.error( "Unable to register ObjectTypeNodeMonitor mbean for OTN "+otn.getObjectType()+" into the platform MBean Server", e);
                }
            }
        }
        final KieBaseConfigurationMonitor kbcm = new KieBaseConfigurationMonitor( kbase.getConfiguration() );
        try {
            final StandardMBean adapter = new StandardMBean(kbcm, KieBaseConfigurationMonitorMBean.class);
            ObjectName name = DroolsManagementAgent.createObjectName( this.name.getCanonicalName() + ",group=Configuration" );
            DroolsManagementAgent.getInstance().registerMBean( kbase,
                                                               adapter,
                                                               name );
        } catch ( NotCompliantMBeanException e ) {
View Full Code Here

            INSTANCE = new DroolsManagementAgent();
            try {
                MBeanServer mbs = getMBeanServer();
                ObjectName mbName = createObjectName( MBEAN_NAME );
                if ( !mbs.isRegistered( mbName ) ) {
                    final StandardMBean adapter = new StandardMBean(INSTANCE, KieManagementAgentMBean.class);
                    mbs.registerMBean( adapter,
                                       mbName );
                }
            } catch ( Exception e ) {
                logger.error( "Unable to register DroolsManagementAgent into the platform MBean Server", e);
View Full Code Here

    }

    public void registerKnowledgeSession(InternalWorkingMemory ksession) {
        KieSessionMonitoringImpl mbean = new KieSessionMonitoringImpl( ksession );
        try {
            final StandardMBean adapter = new StandardMBean( mbean, KieSessionMonitoringMBean.class );
            registerMBean( ksession,
                           adapter,
                           mbean.getName() );
        } catch ( Exception e ) {
            logger.error("Unable to instantiate and register KieSessionMonitoringMBean");
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);
               HornetQJMSServerLogger.LOGGER.debug("Registered JMSBridge instance as: " + this.objectName.getCanonicalName());
            }
            catch (Exception e)
            {
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.