1 Reply Latest reply on Dec 7, 2001 3:29 PM by marcosmaia

    finding an ejb from a remote server

    marcosmaia

      Hi,
      I was looking for some example about how to recover a jndi context in jboss from a web server running in a different point in the network, the standard lookup:
      InitialContext jndiContext = new InitialContext();
      does not do the work as we need to pass at least the ip of the server where the ejb is in, all the examples about jboss I´ve seen does in this standard way, could someone please clarify things for me about it.

      PS-I´ve worked with BEA´s WebLogic and there was a standard getInitialContext provided as the book from Monson Haefel mention, what´s the code for the standard getInitialContext for JBoss.

      thanks in advance.
      Marcos Maia.

        • 1. Re: finding an ejb from a remote server
          marcosmaia

          Hi,
          I´ve solve the problem just did:
          Properties env = new Properties();
          env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
          env.setProperty(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
          env.setProperty(Context.PROVIDER_URL, "localhost:1099");
          System.out.println("debug_1");
          InitialContext jndiContext = new InitialContext(env);