Audit logging using Hibernate

I found two comprehensive references:

 

https://www.hibernate.org/318.html

 

http://java.dzone.com/articles/using-a-hibernate-interceptor-

 

has anyone suceesfully attempted to implement any of these?

Comments

Hi,

I've already used methods similar to the first solution. I found the latter too inversive (please see the first comment on this post)... but there might be a more elegant solution for you... JBoss Envers.

Please look at http://www.jboss.org/envers/ - It might fulfill all your auditing needs

Yanai,

Thanks, looks like a very nice project however I need to write the audit log into compass so I am going to check if there is something i can do with the source code of the project .

Ooops, I thought you need auditing for version (aim of Envers). I only used HibernateSearch (worked as a charm) integrated with Hibernate. But probably Compass has good integration with Hibernate - please look at their interceptor at http://www.compass-project.org/docs/2.0.2/api/org/compass/gps/device/hib...