Package org.hibernate.event.spi

Defines the event types and event listener interfaces for events produced by the stateful Session.

An event represents a request by the session API for some work to be performed, and an event listener must respond to the event and do that work, usually by scheduling some sort of action.

Note that a StatelessSession does not produce events and does not make use of this framework.

API Note:
The framework for event notifications defined in this package is intended for use by extremely sophisticated libraries and frameworks which extend Hibernate, and by the internal implementation of Hibernate itself.

Regular application code should prefer the use of JPA-defined lifecycle callback methods, that is, @PostPersist and friends, or an implementation of the venerable Interceptor interface.