[jboss-cvs] JBossAS SVN: r108692 - branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jaxr/scout/basic.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 20 17:53:43 EDT 2010
Author: rachmatowicz at jboss.com
Date: 2010-10-20 17:53:42 -0400 (Wed, 20 Oct 2010)
New Revision: 108692
Modified:
branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jaxr/scout/basic/JaxrJNDIConnectionTestCase.java
Log:
Fix for JBPAPP-2997
Modified: branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jaxr/scout/basic/JaxrJNDIConnectionTestCase.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jaxr/scout/basic/JaxrJNDIConnectionTestCase.java 2010-10-20 20:09:12 UTC (rev 108691)
+++ branches/JBPAPP_4_2_0_GA_CP/testsuite/src/main/org/jboss/test/jaxr/scout/basic/JaxrJNDIConnectionTestCase.java 2010-10-20 21:53:42 UTC (rev 108692)
@@ -53,11 +53,14 @@
protected InitialContext getClientContext() throws NamingException
{
- String hostname = System.getProperty("host.name");
+ // JBPAPP-2997
+ String hostnameForURL = System.getProperty("host.name.url", "localhost");
+ if (hostnameForURL == null)
+ throw new IllegalStateException("host.name.url system property not present");
Properties env = new Properties();
env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
env.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
- env.setProperty(Context.PROVIDER_URL, "jnp://" + hostname + ":1099");
+ env.setProperty(Context.PROVIDER_URL, "jnp://" + hostnameForURL + ":1099");
return new InitialContext(env);
}
}
More information about the jboss-cvs-commits
mailing list