title: Audit log with JBoss Seam (EJB3+JSF)
body: <p>I would need to implement an audit log for a web application written with JBoss Seam. EntityListeners seem like good candidates, but I don't know how to connect the EntityListeners to the application session context to include the logged in used principal in the audit record.</p>
  
  <p>I wonder if there is a way to do this "connection", or if there is a more confortable/elegant/effective way to implement an audit log for this programming environment.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Rafa.</p>
  
  <p>Edit:<br>
  Many thanks to Damo for his answer! I tried the injection of my identity component,  but it did not work. However, the suggested call to Component.getInstance() did provide the desired reference to the user's identity in the EntityListener.</p>