Thanks a lot for your help. I finally got it working.
Had to annotate the PrincipalEJB with @SessionScoped. It is also important,
that the EJB is a stateful bean.
@Stateful
@SessionScoped
public class PrinciaplEjb {
@Resource
private EJBContext context;
public String info() {
return context.getCallerPrincipal().getName();
}
}
>that's the way tomcat JAASRealm works (in fact this sentence is a little
>shortcut to say the relative hierarchy)
>basically if you create a session before the login it will work.
>here the login is called, there is no session so the principal is not
>cached in the session.
--
View this message in context:
http://openejb.979440.n4.nabble.com/tomcat-openejb-security-integration-directions-tp4656113p4661521.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.