1 Reply Latest reply on Oct 2, 2006 10:57 AM by alrubinger

    Remote client problem

    ivan_penuelas

      Hi, I am trying to access a remote ejb, with mi client but its not working i dont know why here its mi code

      ---------------------------------------------------------------------------------------
      Hashtable<String,String> propsJNDI = new Hashtable<String,String>();
      //Populate the HashtableE object with JNDI environment values
      propsJNDI.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
      propsJNDI.put("java.naming.provider.url","jnp://10.1.18.25:1099");
      propsJNDI.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");

      //Hacemos la conexión con el Bean
      Context c = new InitialContext(propsJNDI);
      Object o = c.lookup ("Conecta");

      ----------------------------------------------------------------------------------
      do I have to change some configuration on the jboss because on the jmx-console the rmi binding its set to 0.0.0.0 and i can not modify it from the jmx-console it trows me an error

      can some one help me or tell me about a topic that discuss that

      hope someone can help me...

        • 1. Re: Remote client problem
          alrubinger

          What kind of error are you getting? Stack trace?

          Couple guesses:

          "0.0.0.0" will bind to "all available addresses" ... if your remote host is resolving this to "localhost", or "127.0.0.1", then that value will be in the remote proxy returned, and your client will try to contact itself. If you're running Linux on your remote host, you can resolve this by editing /etc/hosts to point localhost to "10.1.18.25". This error should manifest itself as an NoSuchObject error or a ConnectException...

          Or maybe you're just looking up the wrong address in JNDI? Ensure it's "Conecta", and not "Conecta/remote" or similar by checking the JNDI Tree: http://wiki.jboss.org/wiki/Wiki.jsp?page=DisplayTheJDNITreeWithTheJMXConsole

          Good luck. :)

          S,
          ALR