Example usage for javax.management MBeanServerFactory createMBeanServer

List of usage examples for javax.management MBeanServerFactory createMBeanServer

Introduction

In this page you can find the example usage for javax.management MBeanServerFactory createMBeanServer.

Prototype

public static MBeanServer createMBeanServer(String domain) 

Source Link

Document

Return a new object implementing the MBeanServer interface with the specified default domain name.

Usage

From source file:org.wso2.andes.server.management.JMXManagedObjectRegistry.java

public JMXManagedObjectRegistry() throws AMQException {
    _log.info("Initialising managed object registry using jplatform MBean server");
    IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();

    // Retrieve the config parameters
    _useCustomSocketFactory = appRegistry.getConfiguration().getUseCustomRMISocketFactory();
    boolean platformServer = appRegistry.getConfiguration().getPlatformMbeanserver();

    _mbeanServer = platformServer ? ManagementFactory.getPlatformMBeanServer()
            : MBeanServerFactory.createMBeanServer(ManagedObject.DOMAIN);
}