System.getProperty("jboss.bind.address");



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");
}

-- ================ Bill Burke Chief Architect JBoss Group LLC. ================



-------------------------------------------------------
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

Reply via email to