how to invoke a session bean method on the other ejb server

Discussions

EJB programming & troubleshooting: how to invoke a session bean method on the other ejb server

  1. I want to use a session bean to invoke a session bean method on the other ejb server, what shall I do? any examples?
    thank you.
  2. i do this:
    for example, in weblogic:

        Properties p = new Properties();
        p.put(Context.INITIAL_CONTEXT_FACTORY,
          "weblogic.jndi.T3InitialContextFactory");
        p.put(Context.PROVIDER_URL,
          "t3://host:port");

        p.put(Context.SECURITY_PRINCIPAL, user);
        p.put(Context.SECURITY_CREDENTIALS, password);

        InitialContext ini = new InitialContext(p);

        HomeEJB home = ctx.lookup("jndi_name_EJB");
        ...

    In another application server, change the values of Properties.

    good luck,
    C├ęsar.