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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to