jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Waschkowski" <mwaschkow...@gmail.com>
Subject Re: listeners and multiple event notification
Date Wed, 22 Aug 2007 23:07:40 GMT
Hi Peeter,

OK, thanks for confirming that. I noticed that when addition is done, then
both the add node and the add property events are raised, but not the
converse for deletion - only the remove_node is event type is raised.
Because of the async nature of the events, I'm less concerned with
performance than I would normally be.

Thanks again,

Mark

PS. ya, I have to send some comments to the group. If they actually remove
xpath from the spec I think I'll print the spec out and then burn it ;)

On 8/22/07, Peeter Piegaze <peeter.piegaze@day.com> wrote:
>
> Hi Mark,
>
> You're right about that. As you point out it is essentially optional
> for a repository to report the removal of all subnodes in a removed
> tree. Obviously this was done because the potential performance hit.
>
> In JSR 283 we are re-writing the observation section and considering
> expanding the vocabulary of  event types to be more semantically
> meaningful (e.g., a "move" instead of the disconnected "remove" plus
> "add") Maybe there is room to address this issue as well.
>
> You can get the current draft here:
>
> http://jcp.org/aboutJava/communityprocess/pr/jsr283/
>
> And send comments here:
>
> jsr-283-comments@jcp.org
>
> Best,
> Peeter
>
> On 8/22/07, Mark Waschkowski <mwaschkowski@gmail.com> wrote:
> > Hi,
> >
> > I am trying out the listener capabilities of Jackrabbit, and it appears
> to
> > me that Jackrabbit does what it must but not what it should, according
> to
> > spec.
> >
> > 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?
> >
> > Thank you,
> >
> > Mark
> >
>
>
> --
> Peeter Piegaze
>
> Day Software
> Suite 331
> 67 Mowat Avenue
> Toronto Ontario M6K 3E3
> Canada
>
> office +1 416 987 5720
> mobile +1 647 205 2403
> fax +1 866 719 3988
>



-- 
Best,

Mark Waschkowski

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message