JBoss Community

context lookup authentication in JBoss AS 6

created by Yaron Levy in JBoss Remoting - View the full discussion

any idea how to do the authentication from remote client?

 

I tried:

 

java.util.Properties p = new java.util.Properties();

p.put("java.naming.provider.url", "jnp://localhost:1199");

p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");  //also: p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");

p.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");

p.put(Context.SECURITY_PRINCIPAL, username);

p.put(Context.SECURITY_CREDENTIALS, pwd);

 

javax.naming.InitialContext context = new javax.naming.InitialContext(p);

context.lookup("jmx/invoker/RMIAdaptor");

Reply to this message by going to Community

Start a new discussion in JBoss Remoting at Community