title: Inject user entity with EJB
body: <p>I use JAAS authentication in my application. Think think that I have User Entity class like this:</p>
  
  <pre><code>@Entity
  public class User {
      @Id
      public Long id;
  
      public String name;
  
      ...
  </code></pre>
  
  <p>and a rest API like this:</p>
  
  <pre><code>@Stateless
  @LocalBean
  @Path("/users")
  public class Users {
  
      // INJECT USER OBJECT HERE
      @Inject
      private User user;
  
      @Path("/me")
      @Produces({ MediaType.APPLICATION_JSON })
      @GET
      public User getUser() {
          return user;
      }
      ...
  </code></pre>
  
  <p>Is there anyway I create a <code>@Produces</code> method to generate User entity object from <code>@SessionContext.getCallerPrincipal()</code> and EntityManager and Inject it directly into the all rest apis that I want?</p>