RMIServerSocketFactoryImpl: regsiter the APIBuilder

This register the APIBuilder as the MBeanServerBuilder which will cause
the APIMBeanServer to be used as the MBeanServer.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
This commit is contained in:
Amnon Heiman 2016-05-02 13:28:40 +03:00
parent 1daa5eb030
commit 3e95c89310

View File

@ -41,6 +41,9 @@ public class RMIServerSocketFactoryImpl implements RMIServerSocketFactory {
public static JMXConnectorServer jmxServer = null;
public static void maybeInitJmx() {
System.setProperty("javax.management.builder.initial", "com.scylladb.jmx.utils.APIBuilder");
System.setProperty("mx4j.strict.mbean.interface", "no");
String jmxPort = System
.getProperty("com.sun.management.jmxremote.port");