I have a problem with JBoss running on different networks. As a brief overview, we have a development network (which I will call DEV) and a client network (say CLIENT!). They connect through the firewall. In the Dev network, the server is known as 192.168.100.50, in the client network it is known as 10.0.100.50. DNS on both networks allows the corresponding IP over DNS (sqlserver.dev.net).
sqlserver provides 2 services, one through the .NET Web Service and the other through JBoss. When the client starts on the DEV network, both services work fine. When the CLIENT network is running only the .NET service.
The JBoss client throws an UnknownHostException when trying to execute ContextLookup in the following code:
Properties p = new Properties();
p.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
p.put("java.naming.factory.url.pkgs", "=org.jboss.naming:org.jboss.jnp.interfaces");
p.put("java.naming.provider.url", "sqlserver.dev.net:1199");
try {
Context c = new InitialContext(p);
cm = (ServiceRemote)c.lookup(Service.RemoteJNDIName);
} catch (NamingException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
An exception:
Java.rmi.UnknownHostException root exception: Unknown host: SQLserver
, , "sqlserver" . , "sqlserver" , . , "SQLserver" , Windows , , DNS. , , , JBoss "SQLserver" , .
sqlserver:
jgroups.bind_addr
bind.address
java.rmi.server.hostname
- ?