/** * Check if a connection already exists if true it will return the * existing connection else it will attempt a new connection * @param attributes jmx connection attributes * @param wait if true wait the current thread until the end of the connection attempt * @return a jmx connection or null */ protected MBeanServerConnection connect(Hashtable attributes, boolean wait) { if (connection != null){ log.debug("Reused the same connection for url = " + jmxUrl); return connection; } if (!connectionAttemptFlag) tryConnect(attributes, wait); return connection; }
/** * Check if a connection already exists if true it will return the * existing connection else it will attempt a new connection * @param attributes jmx connection attributes * @param wait if true wait the current thread until the end of the connection attempt * @return a jmx connection or null */ protected MBeanServerConnection connect(Hashtable attributes, boolean wait) { if (connection != null){ log.debug("Reused the same connection for url = " + jmxUrl); return connection; } if (!connectionAttemptFlag) tryConnect(attributes, wait); return connection; }