Hi everybody,
I'm working with a database model that has for each row the old style signature fields (insert & update user/date).
To handle that transparently I added a Component with the four fields to each entity. The responsability to populate these fields is left to an EventListener (PreInsert & PreUpdate).
As the EventListener has to be stateless, the username is stored in the http session.
My problem is how to get the username stored in the http session from the EventListener?
I tryed to make the EventListener statefull using a ThreadLocal to store the username at logon, but it's not the same thread as the one handling the request that is calling the listener.
Has someone any idea?
Thank you by advance.
Philippe
|