Raible's Wiki
Raible Designs AppFuseHomepage- Korean - Chinese - Italian - Japanese QuickStart Guide User Guide Tutorials Other ApplicationsStruts ResumeSecurity Example Struts Menu
Set your name in
UserPreferences
Referenced by
JSPWiki v2.2.33
Hide Menu |
Database AuditingYou might want to either audit who has changed the data, or what the specific data changes were. There are a number of options available to you:
Spring should help you do this pretty easily. You would setup a filter/manager at the service layer (extending/implementing the normal transaction manager) that inspects the request and inserts an audit record when appropriate. Then change your service config files to use that manager instead of the transaction manager.
Hibernate supports a flexible audit logging mechanism. Check out "Chapter 13 : Interceptors and events" in the Hibernate 3 Reference documentation or "Section 8.3.2 : Audit Logging" in Hibernate in Action for a detailed coverage on topic.
A traditional way of auditing what data changes have been made is by using triggers and creating mirror audit tables for any tables you want to audit (ie. user_audit). The triggers will fire when a modification to a record occurs, and write to the audit table, writing the state of the record and who made the modification.
|