Author: richard.opalka(a)jboss.com
Date: 2011-02-09 07:18:51 -0500 (Wed, 09 Feb 2011)
New Revision: 13706
Modified:
common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
implemented temporary hack
Modified: common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2011-02-09
11:01:28 UTC (rev 13705)
+++ common/trunk/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2011-02-09
12:18:51 UTC (rev 13706)
@@ -39,11 +39,11 @@
import javax.xml.ws.Service.Mode;
import javax.xml.ws.soap.SOAPBinding;
+import org.jboss.logging.Logger;
import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.spi.SPIProvider;
import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployer.Deployer;
-import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
/**
* A JBossWS test helper that deals with test deployment/undeployment, etc.
@@ -53,6 +53,8 @@
*/
public class JBossWSTestHelper
{
+ private static final Logger LOGGER = Logger.getLogger(JBossWSTestHelper.class);
+
private static final String SYSPROP_JBOSSWS_INTEGRATION_TARGET =
"jbossws.integration.target";
private static final String SYSPROP_JBOSS_BIND_ADDRESS =
"jboss.bind.address";
private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY =
"test.archive.directory";
@@ -241,32 +243,36 @@
if (integrationTarget == null)
throw new IllegalStateException("Cannot obtain system property: " +
SYSPROP_JBOSSWS_INTEGRATION_TARGET);
- // Read the JBoss SpecificationVersion
- String jbossVersion = null;
- try
+ LOGGER.fatal("TODO: remove this ugly hack");
+ if (!integrationTarget.startsWith("jboss7"))
{
- ObjectName oname =
ObjectNameFactory.create("jboss.system:type=Server");
- jbossVersion = (String)getServer().getAttribute(oname,
"VersionNumber");
- if (jbossVersion == null)
- throw new IllegalStateException("Cannot obtain jboss version");
+ // Read the JBoss SpecificationVersion
+ String jbossVersion = null;
+ try
+ {
+ ObjectName oname =
ObjectNameFactory.create("jboss.system:type=Server");
+ jbossVersion = (String)getServer().getAttribute(oname,
"VersionNumber");
+ if (jbossVersion == null)
+ throw new IllegalStateException("Cannot obtain jboss
version");
- if (jbossVersion.startsWith("5.1"))
- jbossVersion = "jboss51";
- else if (jbossVersion.startsWith("5.0"))
- jbossVersion = "jboss50";
- else if (jbossVersion.startsWith("6.1"))
- jbossVersion = "jboss61";
- else if (jbossVersion.startsWith("6.0"))
- jbossVersion = "jboss60";
- else throw new IllegalStateException("Unsupported jboss version: "
+ jbossVersion);
+ if (jbossVersion.startsWith("5.1"))
+ jbossVersion = "jboss51";
+ else if (jbossVersion.startsWith("5.0"))
+ jbossVersion = "jboss50";
+ else if (jbossVersion.startsWith("6.1"))
+ jbossVersion = "jboss61";
+ else if (jbossVersion.startsWith("6.0"))
+ jbossVersion = "jboss60";
+ else throw new IllegalStateException("Unsupported jboss version:
" + jbossVersion);
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException(ex);
+ }
+
+ if (integrationTarget.startsWith(jbossVersion) == false)
+ throw new IllegalStateException("Integration target mismatch: "
+ integrationTarget + ".startsWith(" + jbossVersion + ")");
}
- catch (Exception ex)
- {
- throw new RuntimeException(ex);
- }
-
- if (integrationTarget.startsWith(jbossVersion) == false)
- throw new IllegalStateException("Integration target mismatch: " +
integrationTarget + ".startsWith(" + jbossVersion + ")");
}
return integrationTarget;
Show replies by date