ClientListenerHolder[] holders = notificationProxy.getListeners();
if(holders != null)
{
for(int x = 0; x < holders.length; x++)
{
ClientListenerHolder holder = holders[x];
try
{
rmiServer.getMBeanServer().removeNotificationListener(holder.getObjectName(), notificationProxy, holder.getFilter(), holder.getHandback());
}
catch(InstanceNotFoundException e)
{
log.debug("Could not remove listener for target mbean " + holder.getObjectName() + " as instance is not found.");
}
catch(ListenerNotFoundException e)
{
log.debug("Could not remove listener for target mbean " + holder.getObjectName() + " as listener is not found.");
}
}
}
rmiServer.clientClosed(this);
}