4 Replies Latest reply on Jan 18, 2005 9:28 PM by Scott Stark

    Specify SECURITY_PRINCIPAL and SECURITY_CREDENTIALS ?

    760613 Newbie

      Hi,

      Sorry if you find this question have been already answered in other documents/posts but I really still cant find a good answer!

      I want to use SECURITY_PRINCIPAL and SECURITY_CREDENTIALS from my clients when establish a context.

      Properties env = new Properties();
      env.put(Context.INITIAL_CONTEXT_FACTORY, MY_CTX);
      env.put(Context.PROVIDER_URL, MY_URL);
      //...
      env.put(Context.SECURITY_PRINCIPAL, MY_PRINC);
      env.put(Context.SECURITY_CREDENTIALS, MY_CRED);
      //...
      return new InitialContext(env);
      


      I cant figure out how to solve it without using advanced modules or JBoss specific solution. I really want to keep my code independent and my EAR as portable as possible.

      Thats why all MY_XXXXX constants are given in a properties.

      Thank you!