0 Replies Latest reply on May 26, 2005 4:54 AM by ajayjadhav

    getCallerPrincipal() throws IllegalStateException saying no

    ajayjadhav

      Hello,

      I am also facing a problem with the getCallerPrincipal() method with Jboss 3.2.3. When I try to call this method the container throws an IllegalStateException saying that no security context was set.

      My code looks like:
      =====================================
      public void myCustomMethod() throws RemoteException {
      String loggedUser = ctx.getCallerPrincipal().getName();
      ........
      }
      =====================================

      The setSessionContext method is implemented and sets the context variable.

      Also, I have not configured any "Security Domain" in JBoss for authentication, I am directly using my own Java API to authenticate the user against OpenLDAP Server.

      In this case, how to get the Principal (user) information in EJB?

      Thanks in advance,
      Ajay