-
1. Re: DatabaseServerLoginModule -> difficulties
petertje Mar 6, 2003 4:42 AM (in response to mikewazowski)> This error occurs when I try to start a Bean:
When you start the bean?? Or do you mean "when the bean is called"? How do you call the bean (servlet, client app)? -
2. Re: DatabaseServerLoginModule -> difficulties
mikewazowski Mar 6, 2003 7:49 AM (in response to mikewazowski)Yes, it should be "calling the bean". I call it via client app.
Here is my code-snippet:
---------------------------------------------------------
...
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "username");
env.put(Context.SECURITY_CREDENTIALS, "password");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
ctx = new InitialContext(env);
...
---------------------------------------------------------
Thx, Mike :o) -
3. Re: DatabaseServerLoginModule -> difficulties
petertje Mar 6, 2003 9:50 AM (in response to mikewazowski)The "JBoss way" to pass security credentials is not via the initial context (although for simplicity it is added lately; there was a post about this in this forum quite recently).
The proper way is to let your client app do a Jaas login, using the jboss ClientLoginModule; this will set the security attributes for the bean call.
Hth,
Peter.