javax.management.loading package
Provides the classes which implement advanced dynamic
loading. See the chapter Advanced Dynamic Loading in
the JMX Specification.
An MBean that is of a subclass of {@link
java.lang.ClassLoader} can be used as a class loader to create
other MBeans via the method {@link
javax.management.MBeanServer#createMBean(String, ObjectName,
ObjectName, Object[], String[])}, and to instantiate arbitrary
objects via the method {@link
javax.management.MBeanServer#instantiate(String, ObjectName,
Object[], String[])}. The {@link
javax.management.loading.MLet MLet} class is an example of
such an MBean. It is a {@link java.net.URLClassLoader
URLClassLoader}, so the list of URLs to load classes from can
be configured.
Additionally, an MLet can read a configuration
file that specifies a set of MBeans to be registered in the same
MBean Server as the MLet .
Every MBean Server has a class loader repository
containing all MBeans registered in that MBean Server that
are of a subclass of {@link java.lang.ClassLoader}. The class
loader repository is used by the forms of the
createMBean and instantiate methods
in the {@link javax.management.MBeanServer MBeanServer}
interface that do not have an explicit loader parameter. It
is also used by the MLet class when it does not
find a class in its own set of URLs.
If an MBean implements the interface {@link
javax.management.loading.PrivateClassLoader PrivateClassLoader},
then it is not added to the class loader repository. The class
{@link javax.management.loading.PrivateMLet PrivateMLet} is a
subclass of MLet that implements
PrivateClassLoader .
@see
Java SE 6 Platform documentation on JMX technology,
in particular the
JMX Specification, version 1.4(pdf).
@since 1.5
|