Hi Brett,
can you please file a jira issue and provide your test case? thanks
regards
marcel
Conoly, Brett wrote:
> 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?
> Thanks
>
> -----Original Message-----
> From: Marcel Reutegger [mailto:
marcel.reutegger@...]
> Sent: Tuesday, May 13, 2008 6:15 AM
> To:
users@...
> Subject: Re: EventListener
>
> Hi,
>
> Conoly, Brett wrote:
>> Unfortunately, when I'm checking in my test case for the event
> listener,
>> the method ObservationManager.getRegisteredEventListeners() is
> throwing
>> a null pointer.
>>
>> java.lang.NullPointerException
>> at
>>
> org.apache.jackrabbit.rmi.client.ClientObservationManager.getRegisteredE
>> 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
> anymore.
>
> the exact scope depends on the filter you specify when registering the
> event
> listener [1], but is limited to the workspace the session is logged in.
>
> regards
> marcel
>
>
> [1]
>
http://www.day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/observation/O> bservationManager.html#addEventListener(javax.jcr.observation.EventListe
> ner,%20int,%20java.lang.String,%20boolean,%20java.lang.String[],%20java.
> lang.String[],%20boolean)
>
>