-
Bug
-
Resolution: Obsolete
-
Major
-
None
-
None
-
None
There is an MBeanServer implementation org.jboss.as.jmx.tcl.TcclMBeanServer that attempts to implement the classloader switching for MBeans found in jboss6 and before.
However it uses the wrong classloader.
It uses "PlatformMBeanServer".getClassLoaderFor(ObjectName) of the mbean as the classloader.
This is not the classloader passed to createBean(), i.e. the deployment's classloader, it is the classloader where the MBean was loaded from, they are not necessarily the same.
This means classes in the deployment will not be visible for invocations on the mbean unless the place where the mbean class is defined is either the same classloader (this will be true in most cases) or it happens to import the deployment's classloader (very unlikely).
There is a related issue in that because getClassLoaderFor() is no longer correct, deserialisation of requests using the jmx remote connector won't work for classes passed over the wire that are in the deployment.
Finally, because TcclMBeanServer is not built using an MBeanServerBuilder, it can't be the platform MBeanServer, which means tools like jconsole wont use it and the classloader will be wrong for those requests.
- blocks
-
REMJMX-5 ClassLoader based unmarshalling
- Resolved