I have created a standalone client and can access my EJB's. But I have setup two realms on glassfish.
If I access the server with my app-client than always the default realm is used. The parameter I can specify for "ProgrammaticLogin" is ignored.
My default realm is a JDBC realm and the "file" realm is the realm I am using for admins.
File appClientConf = InstalledFileLocator.getDefault().locate("appclientlogin.conf", "at.dclient.servercom", false);
System.setProperty("java.security.auth.login.config", appClientConf.getAbsolutePath());
ProgrammaticLogin pm = new ProgrammaticLogin();
Boolean login = pm.login(usrnm, pw, "file", true);
//read properties jndi properties - port and hostname of app server
File jndiPropFile = InstalledFileLocator.getDefault().locate("jndi.properties", "at.dclient.servercom", false);
Properties jndiProps = new Properties();
jndiProps.load(new FileInputStream(jndiPropFile));
ctx = new InitialContext(jndiProps);
I am using glassfish v3.01
Have anybody a clue why the realm parameter is ignored ?
[Message sent by forum member 'lanthale']
http://forums.java.net/jive/thread.jspa?messageID=479143