Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents


Use eclipselink.session-event-listener to specify a descriptor event listener to be added during bootstrapping.


Table 5-86 describes this persistence property's values.

Table 5-86 Valid Values for session-event-listener

Value Description

Class name

A qualified class name for a class that implements the org.eclipse.persistence.sessions.SessionEventListener interface.



Example 5-87 shows how to use this property in a persistence.xml file.

Example 5-87 Using session-event-listener in persistence.xml

<property name="eclipselink.session-event-listener" value="mypackage.MyClass.class"/>

Example 5-87 shows how to use this property in a property map.

Example 5-88 Using session-event-listener in Property Map

import org.eclipse.persistence.config.PersistenceUnitProperties;
propertiesMap.put(PersistenceUnitProperties.SESSION_EVENT_LISTENER_CLASS, "mypackage.MyClass.class");

See Also

For more information, see: