Using jboss 3.2.3 on linux (happily for some time).
Now need a remote instance of tomcat to be able to access stateless session beans on the jboss server.
Jboss server is inside a firewall with address 10.0.0.46.
NAT translating that address into external address xx.xx.xx.xx.
From tomcat, the java.naming.provider.url is xx.xx.xx.xx:1099.
If from remote machine I do "telnet xx.xx.xx.xx 1099" jboss sends back a response. In the response is a reference to 10.0.0.46 rather than xx.xx.xx.xx.
When starting up the remote tomcat instance attempting to access xx.xx.xx.xx it generates a javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: Exception creating connection to: 10.0.0.46; nested exception is: java.net.NoRouteToHostException: No route to host]
[snip]
at javax.naming.InitialContext.lookup(InitialContext.java:351)
Of course, it can not find 10.0.0.46 from a remote server. But, it does kind of make sense that jboss is reporting back that address since it is the real address of the machine.
So, how do I deal with this? Force jboss to report back the external address? Config tomcat to ignore that and use xx.xx.xx.xx?
I also need to be able to continue to access the jboss instance internally.
Glad to try anything. I've tried forcing rmi to do things through -D settings, but nothing has worked.
Ok, I discovered the HttpNamingContextFactory.
Is this the best way to resolve this?