jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Haycock <Robert.Hayc...@artificial-solutions.com>
Subject How to listen for any lock timeout
Date Tue, 08 Nov 2016 17:07:14 GMT

I want to be able to listen for lock time outs. How to do this?

I had tried this, called when I initialise the app...

    EventListener listener = (EventIterator events) -> {
            while (events.hasNext()) {
                try {
                    Event event = events.nextEvent();
                    String path = event.getPath();
                    if (!path.endsWith(JcrConstants.JCR_LOCKOWNER))


                } catch (RepositoryException ex) {
                    log.warn("Unable to get property path for PROPERTY_REMOVED event", ex);

        observationManager.addEventListener(listener, Event.PROPERTY_REMOVED,
            "/MyRoot", true, null, null, false);

But the listener never gets called. Not even when I call LockManager.Unlock().

Does the session (where I got the ObservationManager from) have to remain open?


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