5 Replies Latest reply on Sep 1, 2005 3:05 AM by Chetan Aggarwal

    Access EJB from Servlet on different JBOSS server

    Chetan Aggarwal Newbie

      Hi ,

      I have two JBOSS instances running on two different machines (Say A , B). I have deployed same EJBS on both machines. I have one servlet at machine A in which i am tring to access one EJB in both servers. I am getting initial context to both the server using :
      Context c = new InitialContext(prop);
      LOG.info("Context Created For:" + c.getEnvironment().get(c.PROVIDER_URL));

      Where prop is different for different machines.
      Now i am looking up EJB and calling method on Remote. But both executions seem to happening on machine A only. i.e local server.

      Is InitialContext(props) always returns local server context???

      Please help