jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conoly, Brett" <Brett.Con...@digitalinsight.com>
Subject RE: EventListener
Date Tue, 13 May 2008 11:19:24 GMT
Makes sense, but when I have the Listener on my server it works and when
I run it through my test case it fails because of the null pointer.

What I have is just a singleton that reads in a properties file once.
But I'm registering an event listener through the constructor and then
closing the session behind it.

Like I said, this seems to work on my server because when I was
attempting to run my test cases it would pick up on a change and reload
the properties.

I'm using rmi in both my test case and on my server but it is still
throwing the null pointer.  Anyone have any clue why?

-----Original Message-----
From: Marcel Reutegger [mailto:marcel.reutegger@gmx.net] 
Sent: Tuesday, May 13, 2008 6:15 AM
To: users@jackrabbit.apache.org
Subject: Re: EventListener


Conoly, Brett wrote:
> Unfortunately, when I'm checking in my test case for the event
> the method ObservationManager.getRegisteredEventListeners() is
> a null pointer.
> java.lang.NullPointerException
>     at
> ventListeners(ClientObservationManager.java:105)
> Does anyone know why this is?

this might be a bug in the jackrabbit-rmi module. does it also happen
when you 
run the code directly on jackrabbit-core without using RMI?

> Also, when I register an EventListener, does it register the event for
> the Session, over the entire workspace, or what?

the event listener is bound to the life cycle of the session that
registered the 
listener. if you logout the session the listener will not get events

the exact scope depends on the filter you specify when registering the
listener [1], but is limited to the workspace the session is logged in.



View raw message