.getJmxConnectors(); if (getConfig().isAdminEnabled() && jmxConnectors != null && jmxConnectors.getProtocols().contains(protocol)) { try {
if(config.isAdminEnabled()) {
return false; if (sc.isServer() && cmiConfig.getClusterViewManagerFactoryConfig().getConfig().isAdminEnabled()) { MBeanUtils.setMBeanParameters(domainName, serverName, agentId);
public synchronized final void stop() { if(getState().equals(State.STARTED) || getState().equals(State.AVAILABLE)) { setState(State.STOPPING); stopping(); if(getConfig().isAdminEnabled()) { // Unregister the CMI MBean try { MBeanUtils.unregisterCMIMBean(); } catch (CMIMBeanConfigException e) { LOGGER.error("Cannot unregister CMIMBean", e); } } setState(State.STOPPED); LOGGER.info("Cluster view manager stopped."); } }
if (getConfig().isAdminEnabled() && jmxConnectors != null && jmxConnectors.getProtocols().contains(protocol)) { try {
if(getConfig().isAdminEnabled()) {
public void clear() { dispatcher.stop(); if(ClusterViewManagerFactory.getFactory().getConfig().isAdminEnabled()) { String domain = MBeanUtils.getMBeanDomainName(); String clusterName = channel.getClusterName(); String name = domain + ":type=channel,cluster=" + clusterName + ",name=HA"; String protos = domain + ":type=protocol,cluster=" + clusterName + ",name=HA" + ",*"; try { JmxConfigurator.unregisterChannel(MBeanUtils.getMBeanServer(), name); JmxConfigurator.unregister(MBeanUtils.getMBeanServer(), protos); } catch (Exception e) { logger.warn( "Error when unregistering the channel with name {0} from the MBean server", clusterName, e); } } channel.disconnect(); channel.close(); processThread.stopExecution(); }
/** * Stop the server-side manager. */ @Override public void doStop() { setRegistrationOpened(false); setImplementationAvailable(false); resumableRunnable.stopExecution(); if(getConfig().isAdminEnabled()) { String domain = MBeanUtils.getMBeanDomainName(); JChannel channel = (JChannel) distributedTree.getChannel(); String clusterName = channel.getClusterName(); MBeanServer mBeanServer = MBeanUtils.getMBeanServer(); try { JmxConfigurator.unregisterChannel(channel, mBeanServer, domain, channel.getClusterName() + ",name=" + MBeanUtils.getMbeanName()); } catch (Exception e) { LOGGER.error( "Error when unregistering the channel with name {0} from the MBean server", clusterName, e); } } connectionManager.setTimeout(0); distributedTree.stop(); }
if(getConfig().isAdminEnabled()) {