Title: Passing a security principal from client to bean

I am trying the following without success.
My jonas-users.properties is
joebar = admin

java.util.Properties props = new java.util.Properties();
        props.put(Context.SECURITY_PRINCIPAL, "joebar");
        //props.put(Context.SECURITY_CREDENTIALS, "123"); 

        Context initialContext = null;
        try {
            //initialContext = new InitialContext(props);
            initialContext = new InitialContext(props);
        } catch (Exception e) {
            System.err.println("Cannot get initial context for JNDI: " + e);
            System.exit(2);
        }

It thinks that the principal is Jonas_client via the following trace message.
"received_request() : received request context principal : name = JOnAS_client"

Reply via email to