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)
          Init MBeanServer
static void registerProtocolConfigurationMBean(ProtocolConfigurationImplMBean protocolConfiguration, org.apache.commons.logging.Log logger, java.lang.String domainName, 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)
                               throws ConfigurationException
Init MBeanServer

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

registerProtocolConfigurationMBean

public static void registerProtocolConfigurationMBean(ProtocolConfigurationImplMBean protocolConfiguration,
                                                      org.apache.commons.logging.Log logger,
                                                      java.lang.String domainName,
                                                      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
domainName - the name of the JOnAS domain
serverName - the name of the server (for ObjectName)
Throws:
ConfigurationException - if the registration failed