Closing the JMX connection to fix the connection leaks.