Question

Our current application uses tech stacks such as: Struts2, Spring, and Hibernate, which are common stacks used in Java EE applications.

We want to introduce the idea of Audit Logging (for each CRUD operations) into our application.

Just want a generic way/pattern (which means I don't want to do some logging for each entity, just generic) to do audit logging in our application? It's good to have both design and implementation details or examples.

Also can we use Struts2's interceptors or Spring AOP or Hibernate's features for audit logging?

Was it helpful?

Solution

Hibernate event listeners and JPA interceptors can of course be used for auditing. With that approach you will end up writing auditing code by yourself.

I find Hibernate Envers most natural for auditing. Audit data is stored to database. If you want to take a short look, documentation can be found from: http://docs.jboss.org/envers/docs/index.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top