[jboss-user] [Security & JAAS/JBoss] - Re: looking for working example: custom login module extends

rsanka do-not-reply at jboss.com
Wed Mar 5 14:40:04 EST 2008


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



More information about the jboss-user mailing list