private static synchronized void startLocalManagementAgent() { Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }
private static synchronized void startLocalManagementAgent(){ Properties agentProps = VMSupport.getAgentProperties(); // start local connector if not started if (agentProps.get(LOCAL_CONNECTOR_ADDRESS_PROP) == null) { JMXConnectorServer cs = ConnectorBootstrap.startLocalConnectorServer(); String address = cs.getAddress().toString(); // Add the local connector address to the agent properties agentProps.put(LOCAL_CONNECTOR_ADDRESS_PROP, address); try { // export the address to the instrumentation buffer ConnectorAddressLink.export(address); } catch (Exception x) { // Connector server started but unable to export address // to instrumentation buffer - non-fatal error. warning(EXPORT_ADDRESS_FAILED, x.getMessage()); } } }