Package javax.management

Examples of javax.management.MBeanServer.registerMBean()


                 : new PeriodicCommitLogExecutorService(this);

        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        try
        {
            mbs.registerMBean(this, new ObjectName("org.apache.cassandra.db:type=Commitlog"));
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here


        // Register this instance with JMX
        try
        {
            MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
            mbs.registerMBean(this, new ObjectName(MBEAN_NAME));
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here

        callbacks = new ExpiringMap<String, CallbackInfo>(DEFAULT_CALLBACK_TIMEOUT, timeoutReporter);

        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        try
        {
            mbs.registerMBean(this, new ObjectName(MBEAN_NAME));
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here

    public HintedHandOffManager()
    {
        MBeanServer mbs = ManagementFactory.getPlatformMBeanServer();
        try
        {
            mbs.registerMBean(this, new ObjectName("org.apache.cassandra.db:type=HintedHandoffManager"));
        }
        catch (Exception e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here

            }
           
            if (server != null && objName != null)
            {
               server.registerMBean(pcWrapper, objName);
            }
           
            cacheLocal = true;
         }
         setPlainCache(pcWrapper.getCache());
View Full Code Here

            public String getModuleState() {
                return context.getModule().getState().toString();
            }
        };
        StandardMBean mbean = new StandardMBean(moduleState, ModuleStateB.class);
        server.registerMBean(mbean, getObjectName(context.getModule()));
    }

    @Override
    public void stop(ModuleContext context) throws Exception {
        MBeanServer server = ServiceLocator.getRequiredService(context, MBeanServer.class);
View Full Code Here

            public String getModuleState() {
                return context.getModule().getState().toString();
            }
        };
        StandardMBean mbean = new StandardMBean(moduleState, ModuleStateA.class);
        server.registerMBean(mbean, getObjectName(context.getModule()));
    }

    @Override
    public void stop(ModuleContext context) throws Exception {
        MBeanServer server = ServiceLocator.getRequiredService(context, MBeanServer.class);
View Full Code Here

      mBeanServer = startMBeanServer();
      startedServer = true;
    }

    try {
      mBeanServer.registerMBean( mBean, objectName );
      if ( registeredMBeans == null ) {
        registeredMBeans = new ArrayList<ObjectName>();
      }
      registeredMBeans.add( objectName );
    }
View Full Code Here

            throw MESSAGES.mbeanRegistrationFailed(e, name);
        }

        try {
            ROOT_LOGGER.debugf("Registering [%s] with name [%s]", value, objectName);
            mBeanServer.registerMBean(value, objectName);
        } catch (Exception e) {
            throw MESSAGES.mbeanRegistrationFailed(e, name);
        }
    }
View Full Code Here

      // Start server.
      String connectionListenerName = "jboss:type=connectionlistener";
      ObjectName objName = new ObjectName(connectionListenerName);
      MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
      TestConnectionListener listener = new TestConnectionListener();
      mbeanServer.registerMBean(listener, objName);
      setupServer(connectionListenerName, mbeanServer);
     
      // Create client.
      InvokerLocator clientLocator = new InvokerLocator(locatorURI);
      HashMap clientConfig = new HashMap();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.