2 Replies Latest reply on Jul 5, 2007 4:36 AM by berrysx

    How to get a reference to Subject

      I'm in the process of migrating to EJB3.0.

      I used to access the Subject in a stateless session bean as follows:

      Subject subject = (Subject) ic.lookup("java:comp/env/security/subject");

      But in the same bean using EJB3 this code throws:
      javax.naming.NameNotFoundException: env not bound

      My question is how do I get a reference to the Subject?

      Thanks