Este contenido no está disponible en el idioma seleccionado.

2.3. Event listeners


Hibernate Entity Manager needs to enhance Hibernate core to implements all the EJB3 semantics. It does that through the event listener system of Hibernate. Be careful when you use the event system yourself, you might override some of the EJB3 semantics. A safe way is to add your event listeners to the list given below.
Expand
Table 2.2. Hibernate Entity Manager default event listeners
Event Listeners
flush org.hibernate.ejb.event.EJB3FlushEventListener
auto-flush org.hibernate.ejb.event.EJB3AutoFlushEventListener
delete org.hibernate.ejb.event.EJB3DeleteEventListener
flush-entity org.hibernate.ejb.event.EJB3FlushEntityEventListener
merge org.hibernate.ejb.event.EJB3MergeEventListener
create org.hibernate.ejb.event.EJB3PersistEventListener
create-onflush org.hibernate.ejb.event.EJB3PersistOnFlushEventListener
save org.hibernate.ejb.event.EJB3SaveEventListener
save-update org.hibernate.ejb.event.EJB3SaveOrUpdateEventListener
pre-insert org.hibernate.secure.JACCPreInsertEventListener, org.hibernate.valitator.event.ValidateEventListener
pre-insert org.hibernate.secure.JACCPreUpdateEventListener, org.hibernate.valitator.event.ValidateEventListener
pre-delete org.hibernate.secure.JACCPreDeleteEventListener
pre-load org.hibernate.secure.JACCPreLoadEventListener
post-delete org.hibernate.ejb.event.EJB3PostDeleteEventListener
post-insert org.hibernate.ejb.event.EJB3PostInsertEventListener
post-load org.hibernate.ejb.event.EJB3PostLoadEventListener
post-update org.hibernate.ejb.event.EJB3PostUpdateEventListener
Note that the JACC*EventListeners are removed if the security is not enabled.
You can configure the event listeners either through the properties (see Section 2.2, “Configuration and bootstrapping”) or through the Ejb3Configuration.getEventListeners() API.
Volver arriba
Red Hat logoGithubredditYoutubeTwitter

Aprender

Pruebe, compre y venda

Comunidades

Acerca de la documentación de Red Hat

Ayudamos a los usuarios de Red Hat a innovar y alcanzar sus objetivos con nuestros productos y servicios con contenido en el que pueden confiar. Explore nuestras recientes actualizaciones.

Hacer que el código abierto sea más inclusivo

Red Hat se compromete a reemplazar el lenguaje problemático en nuestro código, documentación y propiedades web. Para más detalles, consulte el Blog de Red Hat.

Acerca de Red Hat

Ofrecemos soluciones reforzadas que facilitan a las empresas trabajar en plataformas y entornos, desde el centro de datos central hasta el perímetro de la red.

Theme

© 2025 Red Hat