/** * Connects to the JMX agent in the local process. * * @throws ConnectionFailedException if there was a failure to connect to the local JMX connector in the process * @throws IOException if the JDK management agent cannot be found and loaded */ private void connect() throws ConnectionFailedException, IOException { try { final JMXServiceURL jmxUrl = getJMXServiceURL(); this.jmxc = JMXConnectorFactory.connect(jmxUrl); this.server = this.jmxc.getMBeanServerConnection(); } catch (AttachNotSupportedException e) { throw new ConnectionFailedException("Failed to connect to process '" + this.pid + "'", e); } }
/** * Connects to the JMX agent in the local process. * * @throws ConnectionFailedException if there was a failure to connect to the local JMX connector in the process * @throws IOException if the JDK management agent cannot be found and loaded */ private void connect() throws ConnectionFailedException, IOException { try { final JMXServiceURL jmxUrl = getJMXServiceURL(); this.jmxc = JMXConnectorFactory.connect(jmxUrl); this.server = this.jmxc.getMBeanServerConnection(); } catch (AttachNotSupportedException e) { throw new ConnectionFailedException("Failed to connect to process '" + this.pid + "'", e); } }
/** * Connects to the JMX agent in the local process. * * @throws ConnectionFailedException if there was a failure to connect to the local JMX connector in the process * @throws IOException if the JDK management agent cannot be found and loaded */ void connect() throws ConnectionFailedException, IOException { try { final JMXServiceURL jmxUrl = getJMXServiceURL(); this.jmxc = JMXConnectorFactory.connect(jmxUrl); this.server = this.jmxc.getMBeanServerConnection(); } catch (AttachNotSupportedException e) { throw new ConnectionFailedException("Failed to connect to process '" + this.pid + "'", e); } }
/** * Connects to the JMX agent in the local process. * * @throws ConnectionFailedException if there was a failure to connect to the local JMX connector in the process * @throws IOException if the JDK management agent cannot be found and loaded */ void connect() throws ConnectionFailedException, IOException { try { final JMXServiceURL jmxUrl = getJMXServiceURL(); this.jmxc = JMXConnectorFactory.connect(jmxUrl); this.server = this.jmxc.getMBeanServerConnection(); } catch (AttachNotSupportedException e) { throw new ConnectionFailedException("Failed to connect to process '" + this.pid + "'", e); } }