Thanks, I will try that. All the sudden started getting this error on any machine that I try to multihome at the office. It used to work AFAIK. Works if no --host is specified, otherwise my session bean lookups generate this:
10:25:21,281 WARN [NamingContext] Failed to connect to SANDBOX:1099 javax.naming.CommunicationException: Failed to connect to server SANDBOX:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server SANDBOX:1099 [Root exception is java.net.ConnectException: Connection refused: connect]] -----Original Message----- From: Scott M Stark [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 26, 2003 9:55 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Multihome JBoss Issue System.getProperty("jboss.bind.address") == --host value -- xxxxxxxxxxxxxxxxxxxxxxxx Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx Rod Macpherson wrote: > 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"); > } > > ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user