users@glassfish.java.net

Re: How to create a ejb reference from client with Security Credentials?

From: <glassfish_at_javadesktop.org>
Date: Thu, 19 Apr 2007 10:56:02 PDT

Hi,

thanks for this tip.
Now I try the following code:

                 ProgrammaticLogin pl = new ProgrammaticLogin();
                InitialContext ic = new InitialContext();
                pl.login("tom", "tom","imixsrealm",true);
                wipm = (MyEJB) ic.lookup(org.imixs.MyEJB.class.getName());

and also I added the follwing line at the end of the server.policy file in the domains config directory:

     grant {
         permission java.security.AllPermission;
     };


But now I allways got the following exception:

19.04.2007 19:30:00 com.sun.appserv.security.ProgrammaticLogin login
SCHWERWIEGEND: Programmatic login failed: java.lang.SecurityException: Anmeldekonfiguration kann nicht gefunden werden.

The Web Application still works well with login via basic authentification. So only the standalone JEE client will not be able to authenticate and will only runn with ANONYMOUS.

Maybe our glassfish is missing some other configuration settings to allow a programmatic login?

Thanks for hints
Ralph
[Message sent by forum member 'rsoika' (rsoika)]

http://forums.java.net/jive/thread.jspa?messageID=213242