/** * create MBean server connection according to certain JNDI URL * * @return MBean server connection */ public static MBeanServerConnection createMBeanServerConnection(String jndiURL) throws Exception { JMXServiceURL url = new JMXServiceURL(JMXUtilities.createJMXUrl(jndiURL)); JMXConnector jmxc = JMXConnectorFactory.connect(url, null); return jmxc.getMBeanServerConnection(); } }
public static String createJMXUrl(String hostName, int port) { if (isHostNameOfIpv6AndNeedsSquareBrackets(hostName)) hostName = "[" + hostName + "]"; return createJMXUrl(hostName + ":" + port); }
containerName, LOOKUP_JNDI_URL_PROP, LOOKUP_JNDI_URL_DEFAULT); jmxServiceURL = JMXUtilities.createJMXUrl(jndiUrl); Map env = System.getProperties(); jmxConn = JMXConnectorServerFactory.newJMXConnectorServer(
String jmxServiceURL = JMXUtilities.createJMXUrl(_rmiHostAndPort); System.setProperty(CommonSystemProperties.JMX_SERVICE_URL, jmxServiceURL); if (_logger.isLoggable(Level.CONFIG))
final String jmxServiceURL = JMXUtilities.createJMXUrl(hostAddress, registryPort); final String jmxServicePublicURL = JMXUtilities.createJMXUrl(publicHostAddress, registryPort); if (mbs != null) { String publicHostAddress= SystemInfo.singleton().network().getPublicHostId(); final String jmxServiceURL = JMXUtilities.createJMXUrl(hostAddress, jmxRemotePort); final String jmxServicePublicURL = JMXUtilities.createJMXUrl(publicHostAddress, registryPort);