I am using JBoss4.0.5GA on a Linux 2.6.19 kernel. I am running the JBoss server with deployed beans on one host, with a remote client connecting to it from another host. These two hosts are connected by two separate networks. Specifying the host name with just the machine name resolves to one network, specifying with the full name resolves to the other. In other words, machine goes to networkA, machine.whatever.net goes to networkB.
For a variety of reasons I need all traffic to connect over the first network. In my jndi.properties file I specify java.naming.provider.url=machine. This I believe is correctly passing the connection request over the first network. My reason for thinking this is when the server is shut down and I run my client program ctx = new InitialContext(); fails with an exception message of "Failed to connect to server node1:1099" and the first network packet count goes up. However when I make a series of client calls to the bean, those packets pass over the second network. I know this because the packet count on the second network is increasing, while the first is not.
Is there a way to specify that the full host name should not be used for method invocations on EJBs? If any more information would clarify the issue, please feel free to ask.
Thank you for any help,
I ended up getting around this problem by modifying /etc/hosts to resolve the full hostname to the first network when I needed it to. I have still been unable to find a way within JBoss/EJB to specify otherwise.