Using Hibernate Interceptor to manage user and date audits on flushes and saves to the database

On our project we are using an implementation of Hibernate’s Interceptor interface to manage the updating of two audit properties on our tables in the database. Specifically the last update datetime and last update userId.

I was planning on posting an example here but I found this blog entry by Scott Leberknight that sums it up pretty well: