1 Reply Latest reply on Sep 20, 2002 7:39 PM by blynn

    bind a bean to non-default interface

    blynn

      We have a system with multiple ethernet interfaces. Let's say hme0 and hme1. hme0 is the default interface which apparently RMI prefers to bind. hme1 is connected to a private non-routed network. Systems on this private network can only communicate on-net.

      An example of the problem would be client code that is configured to use the ip of hme1 (private network) on port 1099 for naming and the naming server is listening on all interfaces. The client code is able to call getInitialContext(), however the information returned specifies the ip of hme0. The client code will not be able to have any further communications since it has no access to the hme0 interface.

      Is there a way to force a bean to bind to a given interface's ip or hostname other than the default interface?

      Are there any other alternatives (proxies, stubs)?

      It would be nice to be able access a bean via all interfaces -- perhaps requiring a different jndi-name for each interface.

      Thanks

        • 1. Re: bind a bean to non-default interface
          blynn

          I'm updating my own posting just in case some else has a similar issue.

          First off, I have a mistake in my initial posting. I stated the client code is able to call getInitialContext(). My point was that when it calls Context.lookup() it fails due to the RMI issue.

          What I've found it by starting JBoss JVM with
          -Djava.rmi.server.hostname=mymachine.mydomain.com which fixes some of my problems. I still need a solution for multiple interfaces. So if anyone has any ideas please share them. I'm looking at hacking jnp in the mean time.