This content has been marked as final.
Show 1 reply
-
1. Re: Relation Service
slbain Feb 9, 2004 1:03 PM (in response to slbain)Further,
In the RelationSupport class #handleMBeanUnregistration() method
it looks as though the Role.roleValues are not being modified to reflect the removal.handleMBeanUnregistration(ObjectName objectName, String roleName) throws ... { checkRegistered(); Role role = validateRoleFound(roleName); // sb: role.getRoleValue() implementation returns a copy ArrayList values = (ArrayList) role.getRoleValue(); ArrayList oldRoleValue = new ArrayList(values); // sb: this updates the copy if (values.remove(objectName) == false) throw new InvalidRoleValueException("..."); // sb: thus the role state is intact ? updateRole(role, oldRoleValue); }
By adding an call to #setRoleValues() as belowRole role = validateRoleFound(roleName); ArrayList values = (ArrayList) role.getRoleValue(); ArrayList oldRoleValue = new ArrayList(values); if (values.remove(objectName) == false) throw new InvalidRoleValueException("..."); // sb: added role.setRoleValue(values); // end added updateRole(role, oldRoleValue);
it is possible to capture the change for downstream processing.
I am not sure whether this is the correct/best place to apply the update to the Role instance within the processing context however it would appear to be the most opportune in the call sequence.
Hope this helps,
sinclair
panacya inc.