Map localMBeanToRelationId = new HashMap();
synchronized (m_referencedMBeanObjectNameToRelationIds)
{
for (Iterator i = localDeregisteredNotificationList.iterator(); i.hasNext();)
{
MBeanServerNotification serverNotification = (MBeanServerNotification)i.next();
ObjectName deregisteredMBeanName = serverNotification.getMBeanName();
obsoleteReferenceList.add(deregisteredMBeanName);
HashMap relationIdMap = (HashMap)m_referencedMBeanObjectNameToRelationIds.get(deregisteredMBeanName);
localMBeanToRelationId.put(deregisteredMBeanName, relationIdMap);
m_referencedMBeanObjectNameToRelationIds.remove(deregisteredMBeanName);
}
}
// update listener filter to avoid recieving notifications for same MBeans
updateUnregistrationListener(null, obsoleteReferenceList);
for (Iterator i = localDeregisteredNotificationList.iterator(); i.hasNext();)
{
MBeanServerNotification currentNotification = (MBeanServerNotification)i.next();
ObjectName unregisteredMBeanObjectName = currentNotification.getMBeanName();
HashMap localRelationIdMap = (HashMap)(localMBeanToRelationId.get(unregisteredMBeanObjectName));
Set localRelationIdSet = localRelationIdMap.keySet();
// handles the unregistration of mbeans
unregisterReferences(localRelationIdSet, localRelationIdMap, unregisteredMBeanObjectName);