1 Reply Latest reply on Oct 22, 2002 2:28 PM by Mike Pettit

    SecurityContext,  custom modules and getCallerPrincipal

    Mike Pettit Newbie

      Hello -

      Please help me to understand this.
      We are implementing a custom JAAS Login Module and Principal. The classes are JDBCLoginModule and JDBC Principal. This is being added to an existing application that we are migrating to JBOSS. The current app has a bean called CurrentUser which stores info on the user and permissions (used to be on weblogic).
      I am prety certain all my Deployment Descriptors are configured correctly.
      IN CurrentUserBean implements SessionBean{
      /**
      * Determines the username of the current user.
      */
      private String getUserName() {
      return ctx.getCallerPrincipal().getName();
      }

      This Method is throwing an IllegalStateException: SecurityContextNotSet

      Is this because
      -) I have to replace getCallerPrincipal with something else?
      -) I have to use my JDBCPrincipal in here?
      -) I have some bad deployment descriptors?
      -) I have to "register" my credentials with JBoss? How?

      Please Help I have searched and surfed these forums for half the day.

      Thanks in Advance-
      -MP