[jboss-cvs] JBossAS SVN: r66807 - branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Nov 6 22:11:22 EST 2007


Author: bdecoste
Date: 2007-11-06 22:11:22 -0500 (Tue, 06 Nov 2007)
New Revision: 66807

Modified:
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/InitialContextFactory.java
Log:
[JBAS-4805] remove hardcoded localhost

Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/InitialContextFactory.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/InitialContextFactory.java	2007-11-07 02:39:17 UTC (rev 66806)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/InitialContextFactory.java	2007-11-07 03:11:22 UTC (rev 66807)
@@ -31,6 +31,7 @@
 import javax.naming.NamingException;
 
 import org.jboss.logging.Logger;
+import org.jboss.system.server.ServerConfig;
 
 import org.jboss.mx.util.MBeanServerLocator;
 
@@ -111,7 +112,8 @@
          {          
             try
             {
-               env.put(Context.PROVIDER_URL, "localhost:" + getHaJndiPort());
+               String bindAddress = System.getProperty(ServerConfig.SERVER_BIND_ADDRESS);
+               env.put(Context.PROVIDER_URL, bindAddress + ":" + getHaJndiPort());
                InitialContext haCtx = new InitialContext(env);
                haCtx.bind("HA_TEST", null);
                haCtx.unbind("HA_TEST");




More information about the jboss-cvs-commits mailing list