I am using hiberbate 3.5 and spring 3.x
I have envers working and the … _aud and revinfo record are now being written.
I now need to add the username to the audit record I’m guessing revinfo is the best place I have seen an example for seam app but nothing for spring app in jboss
Can anyone help with this please.
My main aim is to be able to record the windows authenticated user.
The Envers documentation has an answer for this if you use Seam.
So, I suppose your question would be how to retrieve the currently logged in user at that point if you don’t use Seam? I’m sure there are several ways to do it, we do it like this.
Code example from filter
Later you can get the user from anywhere in your code because the MDC has a static
get(String)method.