We are using JBoss 6 with EJB2. I have no problem connecting to server from internal network using server internal address (ex : 192.168.10.10) but when I tried to connect through router using external address (ex : 22.214.171.124), I had the error "Connection refused to host: LibrexServer" on client side where "LibrexServer" is the computer name on which JBoss server is installed. I solved this first error by adding -Djava.rmi.server.hostname=librexdemo.acme.com as JVM parameter. Now JNDI calls work fine.
But now, I have the following error on client side and I don’t know which parameter I should set to solve it.
Can not get connection to server. Problem establishing socket connection for InvokerLocator [socket:// LibrexServer:4446/?dataType=invocation&enableTcpNoDelay=true&marshaller=org.jboss.invocation.unified.marshall.InvocationMarshaller&unmarshaller=org.jboss.invocation.unified.marshall.InvocationUnMarshaller]
As you can see, it still tries to connect with internal computer name. Any idea?