开发者

hibernate event detecter

I have a DB running on Oracle. I use Hibernate for data access. I want to be notified whenever an object is saved in the DB, so that I can do some custom work. I want an "event listener" if you could call it that. Is there a way to de开发者_开发问答tect such task ?


On Hibernate level, this is done using interceptors

On Oracle level, it's called trigger:

create or replace trigger <triggername>
before/after insert or update or delete
on <tablename> 
for each row/for each statement
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜