4 Replies Latest reply on Apr 30, 2003 5:02 PM by annapurna

    Connection Factory lookup problem-wierd

    annapurna Newbie

      Hi ,

      I am trying to lookup for "ConnectionFactory" using a remote client. When my jboss server runs on a machine which has static IP everything works fine. If the jboss server runs on a machine which has dynamic IP I get null object when a do a JNDI lookup for any object(EJB,Connection Factory, topic).

      Can anyone please help me solving this problem.

      Thanks,
      Anna

        • 1. Re: Connection Factory lookup problem-wierd
          Adrian Brock Master

          The RMI stub used by the naming service
          determines the IP address from the host name

          This is probably not configured correctly, either
          on the server or the client.

          Regards,
          Adrian

          • 2. Re: Connection Factory lookup problem-wierd
            annapurna Newbie

            Can you please tell me how I can configure the RMI stub. I have no idea what it is?

            Thanks for your response.

            Anna.

            • 3. Re: Connection Factory lookup problem-wierd
              Adrian Brock Master

              This is all in the FAQ forum.

              The naming service is a remote object.

              i.e. You can download an object that
              takes methods invocations on the client
              and passes them to the server.

              The way RMI works means that the remote object
              has an the ip address of the server embedded in
              it. RMI is a bit lame when it comes to working
              out the ip address, it can often get it wrong
              when it has a choice or it is misconfigured.
              e.g. /etc/hosts on redhat

              You can see the ip address used if you telnet to
              port 1099 (it is embedded in the junk).

              Possible solutions are to check your
              host<-->ip config, either your local host table
              or a dns.

              You can explicitly set the ip address/host name to use
              by setting the java property on the java command
              in run.sh or run.bat
              -Djava.rmi.server.hostname=whatver

              Or just tell it to use your hostname rather than
              an ip address
              -Djava.rmi.server.hostname

              Using the hostname means the clients need
              to be able to map the hostname to an ip
              address.

              Regards,
              Adrian

              • 4. Re: Connection Factory lookup problem-wierd
                annapurna Newbie

                Hi Adrain,

                Thanks for the information. I am using 'IPAddress' to connect to jboss both at the server and the client but still the client is not able to lookup the connectionfactory if the server has a dynamic address. If the server has static address it works.

                Could someone help me.

                Anna.