jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcel Reutegger <marcel.reuteg...@gmx.net>
Subject Re: Event Listeners?
Date Tue, 27 May 2008 08:08:27 GMT

Conoly, Brett wrote:
> The way that I'm registering the event listener right now, I'm opening a
> session and then closing it through a try...finally block.

this way, you will never get events because all event listeners that were 
registered by a session are unregistered on Session.logout(). If you still get 
events then that's actually a bug.

> When I close this session does it send a signal to this background
> thread telling it to finish up, or is it just sitting in limbo?

This depends on your setup (JCA, RMI, JCR2SPI). If you are just using a local 
jackrabbit repository, then a Session.logout() will remove an event consumer 
from the workspace wide ObservationDispatcher, which contains a background 
thread for event notification. but this thread is tied to the workspace and not 
to a session.

I don't know how events are dispatched using RMI, but Jukka might shed some 
light on this.

> And if I do have to keep a reference to a session for the life of the
> repository and/or the event listener, is there a way that I can increase
> the number of connections that the repository allows?

Just using plain jackrabbit-core the only limiting factor is heap memory. Using 
JCA, there is a configuration parameter that limits the number of sessions that 
can be opened, IIRC.


View raw message