From: Belal <nu...@jb...> - 2005-03-05 07:24:14
|
Hi, I found there are 2 ways to get the subject from the ejb container, 1) InitialContext ic = new InitialContext(); Subject subject = (Subject)ic.lookup("java:comp/env/security/subject"); 2) AccessControlContext ctx = AccessController.getContext(); Subject subject = Subject.getSubject(ctx); first option works successfully, but the second option fails (subject is null)!! which one is JAAS/J2EE standard? why the second one didn't work? and when and why to use either option? thanks, Belal View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3868902#3868902 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3868902 |