Hi. Again.
  Now. The code seems correct. Except, the url, that MAY require to be of the type: ormi://localhost/Your_App_Name.
  If you have deployed your beans in an application, and NOT in the default APP, you HAVE to use the url with the app_name at the end.
  in config/server.xml
    <application name="Your_App_Name" path="../applications/YourApp.ear"/>
  in properties:
    java.naming.provider.url=ormi://your.host.your.domain/Your_App_Name
   or
    java.naming.provider.url=ormi://localhost/Your_App_Name << FOR LINUX MAINLY!
  in java code:
    p.put(Context.PROVIDER_URL, "ormi://localhost/Your_App_Name");
 
  Then you will find your ejbs.
  I would sincerly offer you to look-up the name of the bean without any prefixes. It is hard to move to other app server sometimes. In your case if you have no ejb-link, ejb-ref and so on stuff, just look-up OrgOrganizations:
   ctx.lookup("OrgOrganizations");
 
  Also let's note, that if you use the java:comp/* context it may not port well on different servers.
 
  Lachezar.
  P.S. Give it a try and write again.
 
but i can't look up my ejb,how to config it.
thanks
 
  Hi.
  Make sure you remove the 'deactivated="false"' for admin in config/principals.xml
 
  Lachezar.

Hi,

I writed one EJB and deployed it successful on Orion 1.5.4. But i get the Exception when i test it used one client application:

javax.naming.AuthenticationException: Invalid username/password for default (admin)
        at com.evermind._dn._mu(.:2173)
        at com.evermind._dn._mu(.:2009)
        at com.evermind._dn._es(.:1590)
        at com.evermind._bp._es(.:357)
        at com.evermind.server.rmi.RMIContext.lookup(.:106)
        at javax.naming.InitialContext.lookup(InitialContext.java:347)
        at ejbtest.Test1.main(Test1.java:24)

code:

Properties p = new Properties();
  p.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
  p.put(Context.PROVIDER_URL, "ormi://211.167.71.60:23791");
  p.put(Context.SECURITY_PRINCIPAL, "admin");
  p.put(Context.SECURITY_CREDENTIALS, "123");
  
  try {
   Context ctx = new InitialContext(p);
   OrganizationsHome home = (OrganizationsHome)ctx.lookup("ejb/OrgOrganizations");
   Organizations remote = (Organizations)home.create();
  } catch (Exception ex) {
   ex.printStackTrace();
  }

help me!

= = = = = = = = = = = = = = = = = = = = = =

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡ÖÂ
Àñ£¡

¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡Liu Bin
                          [EMAIL PROTECTED]
¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡¡2002-04-29
 

Reply via email to