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: Using observation
Date Thu, 06 Sep 2007 07:56:46 GMT
Paco Avila wrote:
> I'm adding a new feature in OpenKM (our DMS): document and folder
> subscription, so OpenKM can notify of document changes. I've been
> reading about Jackrabbit Observation and I know how to observe a node,
> but I have some questions:
> 
> * Due to observation life cicle, it should be managed across a system
> session which is alive all the time OpenKM is running, isn't it?

Yes, for your use case that's probably the best option.

> * I can get a list of registered even listeners, but how can I see which
> nodes are observed?

that's not possible, your application has to remember that. And keep in mind 
that you only get the event listeners that were registered with *your* session.

> * If there are several users who want to subscribe to a document node,
> where should I store this list of users? In the observed node I can't
> because the user perhaps don't have wirte access. 

I'd keep it on the user profile (don't know if you have such a construct). On 
application start do a query for all subscriptions and keep them in memory. Add 
a listener for subscription changes, which keeps you informed about subscription 
changes. then add another listener for regular content changes which triggers 
notifications based on the subscriptions you have.

regards
  marcel

Mime
View raw message