[jboss-jira] [JBoss JIRA] Assigned: (AS7-1443) TcclMBeanServer uses wrong classloader
Kabir Khan (JIRA)
jira-events at lists.jboss.org
Mon Aug 22 13:07:17 EDT 2011
[ https://issues.jboss.org/browse/AS7-1443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kabir Khan reassigned AS7-1443:
-------------------------------
Assignee: Kabir Khan (was: John Bailey)
> TcclMBeanServer uses wrong classloader
> --------------------------------------
>
> Key: AS7-1443
> URL: https://issues.jboss.org/browse/AS7-1443
> Project: Application Server 7
> Issue Type: Bug
> Components: JMX
> Affects Versions: 7.0.0.Final
> Reporter: Adrian Brock
> Assignee: Kabir Khan
>
> 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.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list