SeamFramework.orgCommunity Documentation

Chapter 4. Seam JCR - Event Mapping

4.1. Introduction to Event Mapping
4.2. Observing JMS events

Seam JCR provides functionality to fire CDI Events based on events found in JCR. The rules of how events are fired are based around the underlying implementation.

To observe an event, use the @Observes and the additional qualifiers from the seam-jcr-api module (Check package org.jboss.seam.jcr.annotations.events). If you need to watch any JCR event, then avoid using any qualifier at all.

import javax.jcr.observation.Event;
       
    public void observeAdded(@Observes @NodeAdded Event evt) {
    	// Called when a node is added
    }
    
    public void observeAll(@Observes javax.jcr.observation.Event evt) {
    	// Called when any node event occurs 
    }