Here you can find the source of closeJMXConnection()
public static void closeJMXConnection()
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import java.io.IOException; import javax.management.remote.JMXConnector; public class Main { private static JMXConnector jmxc; private static int connectNumber = 0; public static void closeJMXConnection() { if (jmxc != null/* && connectNumber < 1 */) { try { jmxc.close();/* w w w. ja va 2 s . co m*/ jmxc = null; } catch (IOException e) { e.printStackTrace(); } } connectNumber--; } }