}
public void addNotificationListener(ObjectName name, ObjectName listener, NotificationFilter filter, Object handback)
throws InstanceNotFoundException
{
MBeanEntry entry = registry.get(name);
ClassLoader newTCL = entry.getClassLoader();
NotificationBroadcaster broadcaster = entry.getInvoker();
Thread thread = Thread.currentThread();
ClassLoader oldTCL = thread.getContextClassLoader();
try
{
if (newTCL != oldTCL && newTCL != null)
thread.setContextClassLoader(newTCL);
listeners.add(entry.getObjectName(), broadcaster,
(NotificationListener) registry.get(listener).getResourceInstance(), filter, handback);
}
finally
{
if (newTCL != oldTCL && newTCL != null)