org.objectweb.carol.cmi
Class MBeanUtils

java.lang.Object
  extended by org.objectweb.carol.cmi.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 cmi is not initialized with MBeanServer, JMX jars are not required at runtime.

Author:
Florent Benoit - Benoit Pelletier

Method Summary
static javax.management.MBeanServer getMBeanServer()
          Get the MBean server
protected static void initMBeanServer()
          Init MBeanServer
static void setMBeanParameters(java.lang.String domainName, java.lang.String serverName)
          Set the MBean parameters
 
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()
                               throws ServerConfigException
Init MBeanServer

Throws:
ServerConfigException - if the registration failed

setMBeanParameters

public static void setMBeanParameters(java.lang.String domainName,
                                      java.lang.String serverName)
Set the MBean parameters

Parameters:
domainName - the name of the JOnAS domain
serverName - the name of the server for creating mbeans

getMBeanServer

public static javax.management.MBeanServer getMBeanServer()
                                                   throws ServerConfigException
Get the MBean server

Returns:
MBean server
Throws:
ServerConfigException - if an error occurs