A trigger on hibernate (maybe this is called interceptor)
Posted
by Ittai
on Stack Overflow
See other posts from Stack Overflow
or by Ittai
Published on 2010-03-17T08:34:06Z
Indexed on
2010/03/17
8:41 UTC
Read the original article
Hit count: 399
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
© Stack Overflow or respective owner