try {
//get the connection
ConnectionRegistry registry = ConnectionRegistry.getInstance();
MBeanServerConnection connection = registry.getConnection(server, domain);
ASMBeanDiscoveryServiceFactory dicoveryServiceFactory =
ASMBeanDiscoveryServiceFactory.getInstance();
ASMBeanDiscoveryService discoveryService =
dicoveryServiceFactory.getASMBeanDiscoveryService(connection);
Set asMbeans = discoveryService.discoverASMBeans(objectName);
mediator.load(asMbeans);
} catch(Exception e){
if(logger != null){