}
}
public void removeRelations(String CMM_MBean) {
RelationServiceImpl relationService =
RelationServiceImpl.getRelationService();
Relation[] activeRelations = relationService.listRelations();
for (int i = 0; i < activeRelations.length; i++) {
Relation relation = activeRelations[i];
try {
if (ObjectName.getInstance(relation.getDestinationInstanceID()).equals(
ObjectName.getInstance(CMM_MBean)) || ObjectName.getInstance(
relation.getSourceInstanceID()).equals(ObjectName.getInstance(
CMM_MBean))) {
try {
relationService.removeRelation(relation);
} catch (InvalidRelationIdException ex) {
LogDomains.getLogger().log(Level.SEVERE,
"Error removing relation", ex);
}
}