3 Replies Latest reply on Sep 2, 2005 12:49 PM by Michael Small

    How to get Principal in Domain Object

    mike glicksman Newbie

      I am attempting to implement a EntityListener for my Domain Objects. Those Domain Objects that I want to kepp an audit trail on (create user, create date, update user, update date) extend a class which uses an entity listener. In my Entity Listener I use @prePersist and @preUpdate to set the above values.

      The problem is how can I get the Principal from the Session Context in my Domain Objects? Looks like the notion of a Entity Context no longer exists.

      Any ideas?