Do this...
sessionContext.getCallerPrincipal ().getClass().getName()
It will always be an instance java.security.Principal. If you want your userObj to be
returned, then make your userObj implement java.security.Principal interface and
instantiate it in your LoginModule. So now your UserObj becomes the type Principal &
you are set.
I picked this from javadocs for javax.ejb.EJBContext. SessionContext extends this.
public java.security.Principal getCallerPrincipal()Obtain the java.security.Principal that
identifies the caller.
| Returns:
| The Principal object that identifies the caller. This method never returns null.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134643#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...