Hello Orion-Interest,

  I have a full J2EE application and I want to call a remote ejb
  in another orion with the same application.
  I use J2EE standard declarative security (by role-mapping) in
  the EJBs.

  I dont have a client-application.xml, I have a war (with web.xml with
  ejb/refs) and a jar (with ejb-jar.xml with security).

I try this in a servlet:

        env.put(Context.SECURITY_PRINCIPAL, "beto");
        env.put(Context.SECURITY_CREDENTIALS, "beto");

        env.put("java.naming.provider.url", "ormi://localhost:23791/myapp");

        env.put("java.naming.factory.initial",
            "com.evermind.server.rmi.RMIInitialContextFactory");

        env.put("dedicated.connection" ,"true");
        Context context = new InitialContext (env);

But I reach this Exception

java.lang.SecurityException: Invalid username/password for myapp (beto)
        at com.evermind._cd._mu(Unknown Source)
        at com.evermind._cd._mu(Unknown Source)
        at com.evermind._cd._np(Unknown Source)
        at com.evermind._ce._np(Unknown Source)
        at com.evermind.server.rmi.RMIContext.lookup(Unknown Source)
        at javax.naming.InitialContext.lookup(InitialContext.java:350)
        at com.tbbn.export.srvSender.callRemote(srvSender.java:538)
        ....

  What's wrong?
  
  Thanks.
-- 
Best regards,
 Alberto                          mailto:[EMAIL PROTECTED]


Reply via email to