7 Replies Latest reply on Oct 25, 2002 10:19 PM by lin

    Problems with getCallerPrincipal() Method

    Markus Beier Newbie

      Hi,
      I have read many threads regarding my problem, but in none of them I could find an answer. I've encountered a strange variant of it.
      I can login using jaas. Then I call a method of a stateless session bean. This works completely fine. Here I can call the getCallerPrincipal() Method which returns the expected result. But when I try the same in the ejbCreate() Mehtod of a statful session bean, I get an Exception saying that there is no SecurityContext set. I cannot find a difference between the beans in the config files and when I remove the permissions for the role I get the expected exception saying, that the caller needs other permission. In the exception text, the principal is quoted correctly.
      I am using JBoss 3.0.0. Please help me. This problem really drives me crazy.

      Thank you in advance.