Implementing Audit Trail- Spring AOP vs.Hibernate Interceptor vs DB Trigger
Posted
by RN
on Stack Overflow
See other posts from Stack Overflow
or by RN
Published on 2009-04-20T16:38:33Z
Indexed on
2010/03/18
23:41 UTC
Read the original article
Hit count: 1377
I found couple of discussion threads on this- but nothing which brought a comparison of all three mechanism under one thread.
So here is my question...
I need to audit DB changes- insert\updates\deletes to business objects.
I can think of three ways to do this
1) DB Triggers
2) Hibernate interceptors
3) Spring AOP
(This question is specific to a Spring\Hibernate\RDBMS- I guess this is neutral to java\c# or hibernate\nhibernate- but if your answer is dependent upon C++ or Java or specific implementation of hibernate- please specify)
What are the pros and cons of selecting one of these strategies ?
I am not asking for implementation details.-This is a design discussion.
I am hoping we can make this as a part of community wiki
© Stack Overflow or respective owner