javax.management.loading (Java SE 11 & JDK 11 ) (original) (raw)
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 ClassLoader can be used as a class loader to create other MBeans via the method MBeanServer.createMBean(String, ObjectName, ObjectName, Object[], String[]), and to instantiate arbitrary objects via the method MBeanServer.instantiate(String, ObjectName, Object[], String[]). The MLet class is an example of such an MBean. It is a 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 ClassLoader. The class loader repository is used by the forms of thecreateMBean
and instantiate
methods in the 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 PrivateClassLoader, then it is not added to the class loader repository. The classPrivateMLet is a subclass of MLet
that implementsPrivateClassLoader
.
Since:
1.5
See Also:
JMX Specification, version 1.4
- Interface Summary
Interface Description ClassLoaderRepository Instances of this interface are used to keep the list of ClassLoaders registered in an MBean Server. MLetMBean Exposes the remote management interface of the MLet MBean. PrivateClassLoader Marker interface indicating that a ClassLoader should not be added to the ClassLoaderRepository. - Class Summary
Class Description DefaultLoaderRepository Deprecated.UseMBeanServer.getClassLoaderRepository() instead. MLet Allows you to instantiate and register one or several MBeans in the MBean server coming from a remote URL. MLetContent This class represents the contents of the MLET tag. PrivateMLet An MLet that is not added to the ClassLoaderRepository.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.