Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good pattern or framework for adding auditing to an existing app? [closed]

I have an existing J2EE enterprise application to which I need to add auditing, i.e. be able to record CRUD operations on several important domain types (Employee, AdministratorRights, etc.).

The application has a standard n-tier architecture:

  • Web interface
  • Business operations encapsulated within a mixture of stateless session beans and transactional POJOs (using Spring)
  • persistence is a mixture of direct JDBC (from within the business layer) and EJB 2.x BMP entity beans (I know, I know)

My question is: are there any standard patterns or (better still) frameworks/libraries specifically for adding auditing as a cross-cutting concern? I know AOP can be used to implement cross-cutting concerns in general; I want to know if there's something specifically aimed at auditing.

like image 740
Andrew Swan Avatar asked Sep 16 '08 02:09

Andrew Swan


2 Answers

Maybe you should have a look at Audit4j that provides auditing of business functionality and has several options for configuration. Another framework is JaVers that focues more on auditing low-level modification on persistence layer, which might match your case a bit better.

Both framework provide audit-specific functionalities that goes beyond plain AOP/Interceptors.

like image 105
Gerald Mücke Avatar answered Oct 20 '22 12:10

Gerald Mücke


Right now I'm leaning towards using Spring AOP (using the "@AspectJ" style) to advise the business operations that are exposed to the web layer.

like image 2
Andrew Swan Avatar answered Oct 20 '22 13:10

Andrew Swan