I think I found the answer to my problem: (thanks to JBoss test suite!)
I was missing a SecurityDomain annotation on my session beans.

@Stateless
  | @SecurityDomain("MyCustomSecurityDomain")
  | public class MyStatelessBean implements IMyStatelessBean 
  | {
  |    @Resource
  |    SessionContext ejbContext;
  |     
  |    public void testMethod()
  |    {
  |       MyCustomPrincipal principal = (MyCustomPrincipal) 
ejbContext.getCallerPrincipal();
  |       //I get a class cast exception here
  |    }
  | }   

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134384
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to