[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - newbie: automatically writing auditing data

mars1412 do-not-reply at jboss.com
Thu Feb 14 13:32:22 EST 2008


I want to have basic auditing: just need to know who changed/created the entity and when

I created a History component, that I simply include into the entities, that I want to audit.
I use hibernate.ejb.event.post-insert and hibernate.ejb.event.post-update event listeners, to write the history data.

This works, but I noticed that, when I persist a new (simple) entity, the post-insert event is triggered, which will change the history data, triggering an update and the post-update event will change the history data again, triggering another update

is it just the wrong event that I am using, or is this way completely wrong?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4129468#4129468

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4129468



More information about the jboss-user mailing list