2 Replies Latest reply on Feb 27, 2007 6:55 PM by Ron Sigal

    server bind address - documentation

    mazz Master

      On the documentation page describing how the server invoker binds to its server address - section 5.4.3 at http://labs.jboss.com/portal/jbossremoting/docs/guide/ch05.html it says:

      If the serverBindAddress property is set, it will be used for binding. If the serverBindAddress is not set, but the clientConnectAddress property is set, the server invoker will bind to local host address. If neither the serverBindAddress nor the clientConnectAddress properties are set, then will try to bind to the host specified within the InvokerLocator. If the host value of the InvokerLocator is also not set, will bind to local host.


      When serverBindAddress is not set but clientConnectAddress is, "the server invoker will bind to the local host address".

      Is that true? Do I read that right - if only clientConnectAddress is given, it will actually bind to the locahost? (what does this mean when it says "the local host address")? That doesn't seem right. If I don't provide a serverBindAddress, then it should automatically assume the host within the InvokerLocater URL should be the one I bind to.

      I assume this is a mistake in the documentation - I actually haven't tested what "really" happens, but just reading it seems like its either a wrong way to implement this or its just an error in the docs.

        • 1. Re: server bind address - documentation
          Ron Sigal Master

          Hi John,

          That paragraph really is correct.

          I think the point is that clientConnectAddress is only meant to be used when the client connects through a router that maps an external host name to the actual name of the actual host. The fact that clientConnectAddress is set tells the server that the host name in the InvokerLocator is *not* the real host name, thereby throwing the server into the default case of using the local host address.

          The logic is

          if (serverBindAddress is set)
           use it
          else if (clientConnectAddress is not set)
           use host from InvokerLocator
          else
           use local host address
          


          The local host address, by the way, is obtained by the call

          InetAddress.getLocalHost().getHostAddress()
          


          which returns the IP address of the local host.

          I'll try to make the paragraph clearer.

          • 2. Re: server bind address - documentation
            Ron Sigal Master

            Let me try that again. The logic is

            if (serverBindAddress is set)
             use it
            else if (the host is present in the InvokerLocator and clientConnectAddress is not set)
             use host from InvokerLocator
            else
             use local host address