org.objectweb.carol.util.mbean
Class MBeanUtils

java.lang.Object
  extended byorg.objectweb.carol.util.mbean.MBeanUtils

public class MBeanUtils
extends java.lang.Object

This class is used to manage mbean registration. All MBean stuff should go here, all imports on javax.management are in this class. So if carol is not initialized with MBeanServer, JMX jars are not required at runtime.

Author:
Florent Benoit

Method Summary
protected static void initMBeanServer(org.apache.commons.logging.Log logger, java.lang.String idMbeanServer)
          Init MBeanServer
static void registerProtocolConfigurationMBean(ProtocolConfigurationImplMBean protocolConfiguration, org.apache.commons.logging.Log logger, java.lang.String idMbeanServer, java.lang.String serverName)
          Register a ProtocolConfiguration object in MBeanServer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

initMBeanServer

protected static void initMBeanServer(org.apache.commons.logging.Log logger,
                                      java.lang.String idMbeanServer)
                               throws ConfigurationException
Init MBeanServer

Parameters:
logger - the logger to use to log messages
idMbeanServer - the MBeanServer ID
Throws:
ConfigurationException - if the registration failed

registerProtocolConfigurationMBean

public static void registerProtocolConfigurationMBean(ProtocolConfigurationImplMBean protocolConfiguration,
                                                      org.apache.commons.logging.Log logger,
                                                      java.lang.String idMbeanServer,
                                                      java.lang.String serverName)
                                               throws ConfigurationException
Register a ProtocolConfiguration object in MBeanServer

Parameters:
protocolConfiguration - the configuration to register
logger - the logger to use to log messages
idMbeanServer - the MBeanServer ID
serverName - the name of the server (for ObjectName)
Throws:
ConfigurationException - if the registration failed