title: JAAS and JBOSS 5 problem with principal
body: <p>I am working with a piece of code implementing JAAS LoginModule and in the commit method I set the principal with user UUID: </p>
  
  <pre><code>subject.getPrincipals().add(new SimplePrincipal(userUUID)
  </code></pre>
  
  <p>But for some reason when I access the user from EJB Context:</p>
  
  <pre><code>context.getCallerPrincipal().getName()
  </code></pre>
  
  <p>I receive the login name of the user instead of the userUUID I was expecting.</p>
  
  <p>Should I implement custom principal or how to solve this?</p>
  
  <p>Thank you!</p>