Mark Waschkowski wrote:
As per JCR spec:
"8.3.7.4 Removing a Child Node
When a node is removed, a NODE_REMOVED event must be generated
for the node on which the remove was called. Additionally, an
implementation should also generate a NODE_REMOVE or
PROPERTY_REMOVE (as appropriate) for each item in the removed
subtree. "
If I register a listener like so:
observationManager.addEventListener(listener, Event.PROPERTY_REMOVED |
Event.NODE_REMOVED, "/", true, null, null, false);
(note the Event.PROPERTY_REMOVED | Event.NODE_REMOVED parameter)
and then I remove a node that contains a property, only the NODE_REMOVED
event is generated (what MUST be done by the spec) but a PROPERTY_REMOVE
event is not generated (which I was also expecting to be part of the
EventIterator in the onEvent method of my listener). Can someone clarify
whether or not this is expected behavior, or if I am off base about how it
should be behaving?
This is expected behaviour, because it is implemented that way in jackrabbit. If
you think jackrabbit should support property-removed events when a node is
removed, please file a jira issue and request an enhancement.
regards
marcel