org.infinispan.commons.jmx.PlatformMBeanServerLookup Maven / Gradle / Ivy
package org.infinispan.commons.jmx;
import java.lang.management.ManagementFactory;
import java.util.Properties;
import javax.management.MBeanServer;
/**
* Default implementation for {@link MBeanServerLookup}, will return the platform MBean server.
*
* Note: to enable platform MBeanServer the following system property should be passed to the Sun JVM:
* -Dcom.sun.management.jmxremote.
*
* @author [email protected]
* @since 4.0
*/
public class PlatformMBeanServerLookup implements MBeanServerLookup {
@Override
public MBeanServer getMBeanServer(Properties properties) {
return ManagementFactory.getPlatformMBeanServer();
}
}