Hi all,
I am fairly new to Hibernate and wanted to use the Hibernate SaveOrUpdateEventListener for one of my use cases but was strongly advised against using it by a senior engineer saying that Events are the same as Hibernate Interceptors and we should avoid using them (since they can cause the transaction to fail if doing some custom processing).
This raised multiple questions for me:
1. What are the main differences between Events and Interceptors, if any ?
2. In the case of events in general and SaveOrUpdateEvents in particular, are they triggered after the transaction (save/update) has completed ?
3. Do events happen async ?
4. Last but not least, where can I read more about events and their workings ? (I saw
http://docs.jboss.org/hibernate/orm/3.3 ... vents.html, but didn't find sufficient info there to defend my usage of events)
Any help, pointers would be greatly appreciated.
Thanks.