Handles the method
MBeanServerConnection.createMBean(String,
ObjectName, ObjectName, Object[], String[])
. The
Object[]
parameter is wrapped in a
MarshalledObject
.
Returns:
An
ObjectInstance
, containing the
ObjectName
and the Java class name of the newly
instantiated MBean. If the contained
ObjectName
is
n
, the contained Java class name is
{@link #getMBeanInfo getMBeanInfo(n)}.getClassName()
.
Parameters:
-
className - The class name of the MBean to be instantiated.
-
name - The object name of the MBean. May be null.
-
loaderName - The object name of the class loader to be used.
-
params - An array containing the parameters of the
constructor to be invoked, encapsulated into a
MarshalledObject
. The encapsulated array can be
null, equivalent to an empty array.
-
signature - An array containing the signature of the
constructor to be invoked. Can be null, equivalent to an empty
array.
-
delegationSubject - The
Subject
containing the
delegation principals or
null
if the authentication
principal is used instead.
Throws:
-
ReflectionException - Wraps a
java.lang.ClassNotFoundException
or a
java.lang.Exception
that occurred when trying to
invoke the MBean's constructor.
-
InstanceAlreadyExistsException - The MBean is already
under the control of the MBean server.
-
MBeanRegistrationException - The
preRegister
(
MBeanRegistration
interface) method of the MBean has thrown an exception. The
MBean will not be registered.
-
MBeanException - The constructor of the MBean has
thrown an exception.
-
NotCompliantMBeanException - This class is not a JMX
compliant MBean.
-
InstanceNotFoundException - The specified class loader
is not registered in the MBean server.
-
RuntimeOperationsException - Wraps a
java.lang.IllegalArgumentException
: The className
passed in parameter is null, the
ObjectName
passed
in parameter contains a pattern, or no
ObjectName
is specified for the MBean.
-
SecurityException - if the client, or the delegated Subject
if any, does not have permission to perform this operation.
-
IOException - if a general communication exception occurred.