Marcel Reutegger wrote:
Torgeir Veimo wrote:
I create the test2 node of type nen:resource, mixin nen:protected, and attach a number of child nodes of type nen:ace to it. It's all done in one session which I logout of immediately after the save.

you should actually see more than just one property added event. from what I can tell there should be:
- 'property added' for jcr:primaryType on new node 'test2'
- 'property added' for jcr:mixinTypes on new node 'test2'
- 'property added' for jcr:primaryType for each nen:ace you add

are you able to reproduce this behaviour using predefined node types, e.g. using nt:unstructured? If yes can you please put together a small test case and create a jira issue? Thanks

I guess I will do that. I haven't put together a test case yet, but it seems the event path is wrong. When I add my listener like this:


systemSession.getWorkspace().getObservationManager().addEventListener(new ProtectedNodeListener(systemSession),
  (Event.NODE_ADDED | Event.NODE_REMOVED),
  "/", true,
  null,
  new String [] { "nt:folder", "nt:file" },
  true);

Then on creating an nt:folder with path /test3/blabla, the event reports a NODE_ADDED with path /test3/blabla/nen:ace (which is a subnode added in the same session.save() and not an nt:folder node).


--
-Torgeir

Reply via email to