Fixes #3092 - Wrong classloader used to load *MBean classes.

Now using the classloader that loaded the bean class to load
the correspondent *MBean class, as it was before #2727.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
Simone Bordet 2018-11-11 23:35:43 +01:00
parent b57c05999e
commit 9200e02fef
1 changed files with 1 additions and 1 deletions

View File

@ -222,7 +222,7 @@ public class MBeanContainer implements Container.InheritedListener, Dumpable, De
String mName = pName + ".jmx." + cName + "MBean";
try
{
Class<?> mbeanClass = Loader.loadClass(mName);
Class<?> mbeanClass = Loader.loadClass(klass, mName);
Constructor<?> constructor = ModelMBean.class.isAssignableFrom(mbeanClass)
? mbeanClass.getConstructor()
: mbeanClass.getConstructor(Object.class);