On 5 May 2009, at 14:26, Carsten Ziegeler wrote:

Ian Boston wrote:
Are there any facilities in sling for registering jcr event listeners ?

Both the external javax.jcr.observation.EventListener and the
SynchronousEventListener type.

No we don't have extra support in Sling atm. One of the problems here is
that the jcr listeners are tied to a session.

But we're working on a resource based eventing which leverages the OSGi
eventing:

https://issues.apache.org/jira/browse/SLING-944


I am after is a listener that only fires on the cluster node that created it. I need this because I want to ensure that all nodes, however they are created have certain properties (like the id of the creator) if appropriate.

The only way I have found to do this is a SynchronousEventListener, however this is internal to Jackrabbit and so its not possible to activate a bundle containing this.

The SLING-944 patch starts to get close, but its bound to EventListener so one copy of the event will fire on all nodes in a cluster, depending on how the OSGi Event admin service is wired this might mean that you will see duplicates of the event in a cluster..... so your use case may be the same.

(btw, I agree, the session binding is not ideal for general purpose events that have no connection to jcr)

Ian




Carsten
--
Carsten Ziegeler
cziege...@apache.org

Reply via email to