[jboss-user] [EJB 3.0] - How to get a reference to Subject

berrysx do-not-reply at jboss.com
Wed Jul 4 12:31:23 EDT 2007

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?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060536#4060536

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060536

More information about the jboss-user mailing list