Hi,
We have a requirement on our project, where we need to maintain a sort of history of changes that are made to certain Entities in the Application. The the Application is a Java Web App based on Struts, Spring and Hibernate. What sort of approaches have been used in this case ?
- Triggers on the respective tables is one idea but they are not easily maintainable ? and perhaps also they should not be part of transactions (its ok if the triggers fail, but the entity update transactions should not fail ).
- Use AoP for this since its a cross-cutting concern, but has to be really granular, as in capturing only the values when the entity changes. (All edits don't have their corresponding different methods... many edits happen in a single java Method).
- Use Hibernate Event Listeners.
Are there any other approaches for doing this sort of activity ?