9 Replies Latest reply on Dec 17, 2014 4:02 PM by Jacob Ilsø

    Problem when using long-lived sessions, ACLs and events together

    Jacob Ilsø Newbie

      Hi.

       

      I have some problems when using long-lived sessions together with ACLs and events in ModeShape 4.1.0.

       

      I have two users, A and B, and a node, N. Initially N is visible to both users.

       

      1. User A changes ACLs on N so that it is visible to A only.

      2. User B initiates a long-lived session and adds an event listener like this:

        session.getWorkspace.getObservationManager.addEventListener(eventListener, Event.PROPERTY_CHANGED | Event.NODE_ADDED | Event.NODE_REMOVED, "/", true, null, null, false)

      3. User A changes ACLs on N so that it is visible to everyone.

      4. User B does not receive events about this change nor any future changes to N even though the node is now visible to B.

       

      If user B sets up the event listener prior to step 1, everything works as expected. ACLs can change back and forth and B is continually notified.

       

      So it seems to be the case that when setting up an event listener, only the nodes that are visible at that point in time, will participate in future events.

       

      Is that expected behaviour?