0 Replies Latest reply on Jul 19, 2007 1:32 PM by Fausto Minotti

    Tomcat client + JBOSS server

    Fausto Minotti Newbie

      Regarding to JBossIDE-Tutorial.pdf I worked through this tutorial and I reached my first EJB

      Now I?m trying to deploy the application as clent and server using Tomcat 5.5 and JBOSS 4.2.0GA ( on two different host placed in the same lan )
      I have the same project on the JBOSS and the new one in Tomcat
      In Tomcat I copied only the interfaces and servlet because I want to call the EJB method from Tomcat application container
      I modified the code of ComputeServlet.java in this way

      Hashtable env = new Hashtable();
      env.put(Context.PROVIDER_URL, "jnp://");
      Context context = new InitialContext(env);
      Object ref = context.lookup("ejb/Fibo");
      home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);

      during the lookup method I reach the same error message

      --------javax.naming.CommunicationException: Could not obtain connection to any of these urls: and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server [Root exception is java.net.ConnectException: Connection refused: connect]]]

      it seams that the Tomcat client doesn?t reach the JBOSS server
      I wonder if anyone could give me any suggestion
      Many many thanks