A trigger on hibernate (maybe this is called interceptor)
- by Ittai
Hi,
I have a module which uses Hibernate as an ORM solution with EHCache as second level cache.
I have another seperate module which inserts and updates the database.
What I need is to have the ability to trigger an event when a row is inserted or updated.
Let's say I have a Customers table and it is mapped to a Customer entity.
I want some procedure to notify me that a new Customer has been added.
Regarding the second seperate module it uses Hibernate also but at least for the time being they are not connected (I'm pointing this out as if someone thinks that I must share the Hibernate session (or something of the sort) between them then this is something I will consider).
Please note that I have limited experience with Hibernate.
Thanks in advance