jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: onEvent() invocation
Date Wed, 21 Apr 2010 12:13:22 GMT
On Wed, Apr 21, 2010 at 12:04, Ahmed Elshereay <AElshereay@idc.com> wrote:
> Thank you very much. I have only one comment about your reply!
> I doubt listeners are registered per-session! We use the session to get
> the a reference to the Workspace Object, then use that reference to obtain
> another to ObservationManager to register the listeners, those listeners
> are available even in case when logging out the session that was used to
> register them!
> At the begining I thought the same, but I tested it some how, registered
> the listeners, then logged out from created a new session then called
> observationManager.getRegisteredEventListeners() and I found the listeners
> which I registered with the previous session although I didn't register
> them with the new one.

They should be per-session and be automatically released upon
session.logout(), if not, this is a bug.

http://www.day.com/specs/jcr/1.0/8.3.11_Persistence_of_Event_Listeners.html

> WARN  [ObservationDispatcher] EventConsumer threw exception:
> java.lang.NullPointerException

AFAIK, this means your event listener code threw that NPE.

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message