|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.mx.util.MBeanInstaller
MBean installer utility
This installer allows MLet to install or upgrade a mbean based on the version specified in the MLet conf file. If the mbean version is newer than the registered in the server, the installer unregisters the old mbean and then registers the new one. This management needs to store the mbean version into the MBeanRegistry in the server. When we register mbeans, however, we can't pass the metadata to MBeanServer through the standard JMX api because Both of createMBean() and registerMBean() have no extra arguments to attach the metadata. Thus we call MBeanServer.invoke() directly to set/get the internal MBean metadata. Currently version and date are stored in the mbean registry as mbean metadata. The date will be used for preparing presentaionString for this mbean info. For managment purpose, we can add any extra data to the matadata if you need.
Revisions:
20020219 Juha Lindfors:
The current semantics should be:
Field Summary | |
static String |
DATE
|
static String |
VERSIONS
|
Constructor Summary | |
MBeanInstaller(MBeanServer server,
ClassLoader ctxClassLoader,
ObjectName loaderName)
Create a new MBean installer instance. |
Method Summary | |
ObjectInstance |
createMBean(MBeanElement element)
|
ObjectInstance |
deserialize(MBeanElement element)
|
ObjectInstance |
installMBean(MBeanElement element)
Install a mbean with mbean metadata |
ObjectInstance |
updateMBean(MBeanElement element)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String VERSIONS
public static final String DATE
Constructor Detail |
public MBeanInstaller(MBeanServer server, ClassLoader ctxClassLoader, ObjectName loaderName) throws Exception
server
- reference to the MBean server where the new MBeans will
be registered toctxClassLoader
- Context class loader reference which will be
stored in the registry for the new MBeans. This
classloader will be set as the thread context
classloader when the MBean is invoked.loaderName
- Object name of the classloader that should be
used to instantiate the newly registered MBeans.
This should normally be the object name of the
MLet MBean that is installing the new MBeans.Method Detail |
public ObjectInstance installMBean(MBeanElement element) throws MBeanException, ReflectionException, InstanceNotFoundException, MalformedObjectNameException
element
- the data parsed from the Mlet file
MBeanException
ReflectionException
InstanceNotFoundException
MalformedObjectNameException
public ObjectInstance createMBean(MBeanElement element) throws MBeanException, ReflectionException, InstanceNotFoundException, MalformedObjectNameException
public ObjectInstance deserialize(MBeanElement element) throws MBeanException, ReflectionException, InstanceNotFoundException, MalformedObjectNameException
public ObjectInstance updateMBean(MBeanElement element) throws MBeanException, ReflectionException, InstanceNotFoundException, MalformedObjectNameException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |