Title: Message
When running multihome I am getting this on all of the office machines but not on my home network: same version of JBoss, same JDK, same application works fine at home.
 
 [NamingContext] Failed to connect to SANDBOX:1099
 
Ironically this used to work on this very machine. When not specifying --host it everything works fine so there is something twisted about the multihome on our network. I can telnet in to SANDBOX port 1099 and I get back a bunch of gobbledygook that looks like a sane JNDI service connection so it is listenting. I am beginning to think this is a security feature issue on Windows XP that was added but who knows.  
-----Original Message-----
From: Rod Macpherson
Sent: Wednesday, November 26, 2003 9:24 AM
To: [EMAIL PROTECTED]
Subject: [JBoss-user] Multihome JBoss Issue

I use this to get the JNDI properties and bind Globals.HOST in a static class initializer using java.net.InetAddress.getLocalHost().getHostName(). The problem is that method returns the hostname of my box NOT the hostname that JBoss was started with using the --host switch. Given the static method call and the fact that the JVM is not running on the bound --host, it's not surprising that Globals.HOST is not what I want but how then do we get the --host value?
 
public static Properties getJNDIProperties()
{
    Properties properties = new Properties();
 
    if(Globals.JBOSS == Boolean.TRUE)  {
        properties.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
        properties.put("java.naming.provider.url", Globals.HOST + ":1099");
        properties.put("java.naming.factory.url.pkgs", "org.jboss.naming");
    }
 
  

Reply via email to