Hi Erik, Just a quick note, as Alex actually pretty completely responded.
>From your description, I assume, this is mostly a Jackrabbit/JCR issue. So you might be better off asking on the jackrabbit dev (or user list), where also the people implementing clustering are hanging around. Inside Sling, we have additional Eventing Support which takes clustering into account and which may help in ensuring, that only one node is actually handling certain JCR events. This support implemented in the extensions/event bundle replicates JCR events as OSGi events and is able to ensure such translated events are only handled on a single node. But, as Alexander said, using the implementation class directly is not a good idea: First it is not future-proof in terms of changes to the Jackrabbit implementation. And secondly - much more important in terms of OSGi - it locks you into a single use case and bundles. Hope this helps. Regards Felix Am Donnerstag, den 29.05.2008, 12:49 +0200 schrieb Erik Buene: > Hi, > > We've now set up sling/jackrabbit with x instances in a cluster talking > to the same mysql database (which will also be clustered later on). This > seem to work ok in general. > > However our application requires some processing of events when nodes in > the repository changes - this processing will in turn perform other > changes in the repository. This should just be done by one node (the > "local" node that triggered the event). > > Sadly, the jcr Event interface does not have any method to determine if > an event is local or external - but it seems the Jackrabbit > implementation (org.apache.jackrabbit.core.observation.EventImpl) does. > > Checking the instance of Event captured by our EventListener confirms > that it is of this implementation. But performing a cast to EventImpl > fails with a ClassCastException "no class def found". This is probably > due to the ClassLoader of our bundle not having access to the > org.apache.jackrabbit.core.observation package and no other bundles > exporting this package. > > Is my understanding of the problem correct? And if so, is there any > other way than to include the jackrabbit jar file to our bundle to get > the system to cast Event to EventImpl? > >