On Mon, Mar 30, 2009 at 11:24 PM, Alfie Kirkpatrick
<[email protected]> wrote:
> Hi, I am interested in having a listener that only reacts to changes
> made in a given Jackrabbit session, rather than all changes across a
> workspace. Is this possible?

You can use the standard JCR observation mechanism (section 8.3 of the
JSR-170 spec [1]):
session.getWorkspace().getObservationManager().addEventListener() [2]

But this will always give you all repository changes (in case of
clustering, the Jackrabbit-specific isExternal() method on
JackrabbitEvent [3] will mark events that are coming from another
cluster node). What is your use case for not seeing the changes of a
certain session? You should probably separate your "events" by using a
content hierarchy that allows that.

[1] http://www.day.com/specs/jcr/1.0/8.3_Observation.html
[2] 
http://day.com/maven/jsr170/javadocs/jcr-1.0/javax/jcr/observation/ObservationManager.html
[3] 
http://jackrabbit.apache.org/api/1.5/org/apache/jackrabbit/api/observation/JackrabbitEvent.html

Regards,
Alex

-- 
Alexander Klimetschek
[email protected]

Reply via email to