jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torgeir Veimo <torg...@pobox.com>
Subject Re: event listener not getting any events..
Date Fri, 14 Jul 2006 12:40:37 GMT
Marcel Reutegger wrote:
> Torgeir Veimo wrote:
>> I'm registering an event listener like this:
>>
>> systemSession.getWorkspace().getObservationManager().addEventListener(new 
>> ProtectedNodeListener(systemSession),
>>   (Event.NODE_ADDED | Event.NODE_REMOVED | Event.PROPERTY_ADDED | 
>> Event.PROPERTY_REMOVED | Event.PROPERTY_CHANGED),
>>   "/jcr:root",
> 
> what you rather want here is "/" not "/jcr:root" ;)
> 
> /jcr:root is only used in context of a document view mapping, such as 
> document view export or XPath queries.

Thx!

Quick followup question; when i create a node with child nodes, I seem 
to be getting only one event with type PROPERTY_ADDED on one of the 
children of the new node. Eg I create a node

/pages/test2 of type nen:resource, mixin nen:protected, with childen 
nen:ace.

The node I get the event for is the node

/pages/test2/nen:ace/jcr:primaryType

Is there something wrong with my listener registration?

-- 
-Torgeir

Mime
View raw message