jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject Re: Persistent Observation Listeners
Date Wed, 02 Mar 2011 08:15:17 GMT
Hi,

IIRC it is prescribed by the JCR spec that observation listener
registration is bounded by the Session life cycle. One of the reasons
for this is that observation events are filtered by access control.

So, yes, we keep the sessions open for as long as we have an observation
listener registered. An Session will generally not have a big memory
footprint -- if it has such used memory can be collected over time. The
biggest problem would probably be if the Session would keep uncommitted
changes longer than required....

Regards
Felix

Am Dienstag, den 01.03.2011, 20:18 -0500 schrieb Daniel Sbityakov: 
> Hello all. I'm having a conceptual problem with observation event mechanism.
> 
> It appears that any event listener A opened by session B will be
> disconnected from the observation facility when B is closed.  This is
> somewhat odd, because you add event listeners to a workspace-bound
> observation manager, not to a session.  However, jackrabbit
> implementation uses the observation mechanism extensively, but using
> internal "system" sessions, which, I'm guessing, are never closed.
> 
> What is the best practice that you all can recommend when you need
> long-running listeners without the overhead of keeping sessions
> opened?  Or do we follow jackrabbit example and squirrel some sessions
> away and keep them open to keep the observation events communication
> flowing?
> Please advise.
> 
> Thank you!



Mime
View raw message