开发者

hibernate event detecter

开发者 https://www.devze.com 2022-12-10 16:49 出处:网络
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 coul

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

精彩评论

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