Safety jmx connection close added for getting mbean server connection