Software AG Products 10.11 | CentraSite for Developers | Application Framework | Event Mechanism
 
Event Mechanism
The CSAF allows the user to register and receive notifications when certain events occur. Currently, three persistence events are supported: objectDeleted, objectCreated, objectUpdated. These events can be intercepted by implementing the interface com.softwareag.centrasite.appl.framework.persistence.PersistenceEventListener. Such listeners are registered via the BeanPool, which has methods for adding, removing, and retrieving listeners.
All of the supported events are post events, in other words, they are fired after an action has been performed.
Using CSAF in pre-action events has some limitations. This is because the CSAF tries to establish its own connection to the registry data. Under certain circumstances, it may happen that a user searches the registry for a transient object (for example, an object which is still not persisted into the database) and, on which a pre-action event is executing, in such case the user may not be able to retrieve the transient object created using another connection. As a best practice, we recommend that you use the JAXR-based API connection for any pre-action events.