JBossWS SVN: r17639 - in stack/cxf/trunk/modules: server/src/main/java/org/jboss/wsf/stack/cxf/transport and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-31 13:34:34 -0400 (Fri, 31 May 2013)
New Revision: 17639
Modified:
stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
Log:
[JBWS-3644] Using new method
Modified: stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java
===================================================================
--- stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-05-31 17:33:47 UTC (rev 17638)
+++ stack/cxf/trunk/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/ProviderImpl.java 2013-05-31 17:34:34 UTC (rev 17639)
@@ -54,7 +54,6 @@
import org.jboss.ws.common.configuration.ConfigHelper;
import org.jboss.ws.common.utils.DelegateClassLoader;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -536,8 +535,7 @@
{
try {
final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- serverConfig = spiProvider.getSPI(ServerConfigFactory.class, cl).getServerConfig();
+ serverConfig = SPIProvider.getInstance().getSPI(ServerConfigFactory.class, cl).getServerConfig();
} catch (Exception e) {
Loggers.ROOT_LOGGER.cannotRetrieveServerConfigIgnoreForClients(e);
} finally {
Modified: stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java
===================================================================
--- stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2013-05-31 17:33:47 UTC (rev 17638)
+++ stack/cxf/trunk/modules/server/src/main/java/org/jboss/wsf/stack/cxf/transport/ServletHelper.java 2013-05-31 17:34:34 UTC (rev 17639)
@@ -41,7 +41,6 @@
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.ws.common.injection.InjectionHelper;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Reference;
@@ -61,9 +60,8 @@
{
public static Endpoint initEndpoint(ServletConfig servletConfig, String servletName)
{
- ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class, cl).getEndpointRegistry();
+ final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ final EndpointRegistry epRegistry = SPIProvider.getInstance().getSPI(EndpointRegistryFactory.class, cl).getEndpointRegistry();
ServletContext context = servletConfig.getServletContext();
String contextPath = context.getContextPath();
11 years, 6 months
JBossWS SVN: r17638 - in common/trunk/src/main/java/org/jboss/ws/common: configuration and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-31 13:33:47 -0400 (Fri, 31 May 2013)
New Revision: 17638
Modified:
common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java
common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointMetricsDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java
common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
Log:
[JBWS-3644] Using new method
Modified: common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java 2013-05-31 17:32:51 UTC (rev 17637)
+++ common/trunk/src/main/java/org/jboss/ws/common/IOUtils.java 2013-05-31 17:33:47 UTC (rev 17638)
@@ -21,7 +21,6 @@
*/
package org.jboss.ws.common;
-import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
@@ -35,7 +34,6 @@
import javax.activation.DataHandler;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -125,8 +123,7 @@
{
// TODO: recursive dependency, ohoh
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- ServerConfig config = spiProvider.getSPI(ServerConfigFactory.class).getServerConfig();
+ ServerConfig config = SPIProvider.getInstance().getSPI(ServerConfigFactory.class).getServerConfig();
tmpdir = new File(config.getServerTempDir().getCanonicalPath() + "/jbossws");
if (!tmpdir.mkdirs()) {
tmpdir = null;
Modified: common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java 2013-05-31 17:32:51 UTC (rev 17637)
+++ common/trunk/src/main/java/org/jboss/ws/common/configuration/ConfigHelper.java 2013-05-31 17:33:47 UTC (rev 17638)
@@ -42,7 +42,6 @@
import org.jboss.ws.api.configuration.ClientConfigurer;
import org.jboss.ws.common.utils.DelegateClassLoader;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
@@ -232,8 +231,7 @@
private static ServerConfig getServerConfig()
{
final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- ServerConfigFactory scf = spiProvider.getSPI(ServerConfigFactory.class, cl);
+ final ServerConfigFactory scf = SPIProvider.getInstance().getSPI(ServerConfigFactory.class, cl);
return scf != null ? scf.getServerConfig() : null;
}
}
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java 2013-05-31 17:32:51 UTC (rev 17637)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointHandlerDeploymentAspect.java 2013-05-31 17:33:47 UTC (rev 17638)
@@ -23,7 +23,6 @@
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.LifecycleHandler;
@@ -46,7 +45,7 @@
public EndpointHandlerDeploymentAspect()
{
- spiProvider = SPIProviderResolver.getInstance().getProvider();
+ spiProvider = SPIProvider.getInstance();
}
@Override
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointMetricsDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointMetricsDeploymentAspect.java 2013-05-31 17:32:51 UTC (rev 17637)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointMetricsDeploymentAspect.java 2013-05-31 17:33:47 UTC (rev 17638)
@@ -23,7 +23,6 @@
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointMetrics;
@@ -40,8 +39,7 @@
@Override
public void start(Deployment dep)
{
- SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
- EndpointMetricsFactory factory = provider.getSPI(EndpointMetricsFactory.class);
+ EndpointMetricsFactory factory = SPIProvider.getInstance().getSPI(EndpointMetricsFactory.class);
for (Endpoint ep : dep.getService().getEndpoints())
{
EndpointMetrics metrics = factory.newEndpointMetrics();
Modified: common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java 2013-05-31 17:32:51 UTC (rev 17637)
+++ common/trunk/src/main/java/org/jboss/ws/common/deployment/EndpointRegistryDeploymentAspect.java 2013-05-31 17:33:47 UTC (rev 17638)
@@ -23,7 +23,6 @@
import org.jboss.ws.common.integration.AbstractDeploymentAspect;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.EndpointRegistry;
@@ -41,8 +40,7 @@
public void start(Deployment dep)
{
if (factory == null) {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- factory = spiProvider.getSPI(EndpointRegistryFactory.class);
+ factory = SPIProvider.getInstance().getSPI(EndpointRegistryFactory.class);
}
EndpointRegistry registry = factory.getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
@@ -54,8 +52,7 @@
public void stop(Deployment dep)
{
if (factory == null) {
- SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- factory = spiProvider.getSPI(EndpointRegistryFactory.class);
+ factory = SPIProvider.getInstance().getSPI(EndpointRegistryFactory.class);
}
EndpointRegistry registry = factory.getEndpointRegistry();
for (Endpoint ep : dep.getService().getEndpoints())
Modified: common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java
===================================================================
--- common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2013-05-31 17:32:51 UTC (rev 17637)
+++ common/trunk/src/main/java/org/jboss/ws/common/management/AbstractServerConfig.java 2013-05-31 17:33:47 UTC (rev 17638)
@@ -34,7 +34,6 @@
import org.jboss.ws.common.ObjectNameFactory;
import org.jboss.wsf.spi.SPIProvider;
-import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
import org.jboss.wsf.spi.management.ServerConfig;
@@ -181,12 +180,11 @@
}
private int getConnectorPort(boolean secure) {
- ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
+ final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
int port = 0;
try
{
- WebServerInfo webServerInfo = spiProvider.getSPI(WebServerInfoFactory.class, cl).newWebServerInfo();
+ WebServerInfo webServerInfo = SPIProvider.getInstance().getSPI(WebServerInfoFactory.class, cl).newWebServerInfo();
port = webServerInfo.getPort("HTTP/1.1", secure);
}
catch (WSFException e)
@@ -199,9 +197,8 @@
public void create() throws Exception
{
//Retrieve the stackConfig using SPIProvider
- ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- this.stackConfig = spiProvider.getSPI(StackConfigFactory.class, cl).getStackConfig();
+ final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ this.stackConfig = SPIProvider.getInstance().getSPI(StackConfigFactory.class, cl).getStackConfig();
MANAGEMENT_LOGGER.startingWSServerConfig(getImplementationTitle(), getImplementationVersion());
MBeanServer mbeanServer = getMbeanServer();
@@ -223,8 +220,7 @@
if (serverConfig == null)
{
final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
- SPIProvider spiProvider = SPIProviderResolver.getInstance(cl).getProvider();
- serverConfig = spiProvider.getSPI(ServerConfigFactory.class, cl).getServerConfig();
+ serverConfig = SPIProvider.getInstance().getSPI(ServerConfigFactory.class, cl).getServerConfig();
}
return serverConfig;
}
11 years, 6 months
JBossWS SVN: r17637 - spi/trunk/src/main/java/org/jboss/wsf/spi.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-31 13:32:51 -0400 (Fri, 31 May 2013)
New Revision: 17637
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/SPIProvider.java
Log:
[JBWS-3644] Adding getInstance to SPIProvider
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/SPIProvider.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/SPIProvider.java 2013-05-30 15:48:41 UTC (rev 17636)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/SPIProvider.java 2013-05-31 17:32:51 UTC (rev 17637)
@@ -21,6 +21,8 @@
*/
package org.jboss.wsf.spi;
+import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
+
/**
* Gives access to the SPI implementation.
*
@@ -29,7 +31,25 @@
*/
public abstract class SPIProvider
{
+ private static SPIProvider me;
+
/**
+ * Gets the a singleton reference to the SPIProvider returned by the SPIProviderResolver
+ * retrieved using the default server integration classloader.
+ *
+ * @return
+ */
+ public static SPIProvider getInstance()
+ {
+ if (me == null)
+ {
+ final ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
+ me = SPIProviderResolver.getInstance(cl).getProvider();
+ }
+ return me;
+ }
+
+ /**
* Gets the specified SPI, using the current thread context classloader
*
* @param <T>
11 years, 6 months
JBossWS SVN: r17636 - stack/cxf/branches/jbossws-cxf-4.1.x.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-30 11:48:41 -0400 (Thu, 30 May 2013)
New Revision: 17636
Modified:
stack/cxf/branches/jbossws-cxf-4.1.x/pom.xml
Log:
Use latest shared-testsuite snapshots
Modified: stack/cxf/branches/jbossws-cxf-4.1.x/pom.xml
===================================================================
--- stack/cxf/branches/jbossws-cxf-4.1.x/pom.xml 2013-05-30 15:47:29 UTC (rev 17635)
+++ stack/cxf/branches/jbossws-cxf-4.1.x/pom.xml 2013-05-30 15:48:41 UTC (rev 17636)
@@ -63,7 +63,7 @@
<jbossws.spi.version>2.1.2.Final</jbossws.spi.version>
<jbossws.common.version>2.1.1.Final</jbossws.common.version>
<jbossws.common.tools.version>1.1.0.Final</jbossws.common.tools.version>
- <jbossws.shared.testsuite.version>4.1.2-SNAPSHOT</jbossws.shared.testsuite.version>
+ <jbossws.shared.testsuite.version>4.1.3-SNAPSHOT</jbossws.shared.testsuite.version>
<jbossws.jboss711.version>4.1.1.Final</jbossws.jboss711.version>
<jbossws.jboss712.version>4.1.1.Final</jbossws.jboss712.version>
<jbossws.jboss713.version>4.1.1.Final</jbossws.jboss713.version>
11 years, 6 months
JBossWS SVN: r17635 - in shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws: jbws2529 and 3 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-30 11:47:29 -0400 (Thu, 30 May 2013)
New Revision: 17635
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2529/JBWS2529TestCase.java
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2591/JBWS2591TestCase.java
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2593/JBWS2593TestCase.java
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
Log:
Merging commit 17619 from jbossws-cxf stack upstream; do not set system properties on tests run concurrently! (that sys prop change is actually not even needed anymore)
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java 2013-05-30 15:46:29 UTC (rev 17634)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2528/JBWS2528TestCase.java 2013-05-30 15:47:29 UTC (rev 17635)
@@ -54,8 +54,6 @@
private String CLASSES_DIR;
private String TEST_DIR;
- private String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
@@ -64,23 +62,8 @@
CLASSES_DIR = System.getProperty("test.classes.directory");
ENDPOINT_CLASS = "org.jboss.test.ws.jaxws.jbws2528.JBWS2528Endpoint";
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if(origJavaHome.indexOf(FS + "jre")!=-1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
-
public void test() throws Exception
{
File destDir = new File(TEST_DIR, "wsprovide" + FS + "java");
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2529/JBWS2529TestCase.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2529/JBWS2529TestCase.java 2013-05-30 15:46:29 UTC (rev 17634)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2529/JBWS2529TestCase.java 2013-05-30 15:47:29 UTC (rev 17635)
@@ -52,8 +52,6 @@
private String CLASSES_DIR;
private String TEST_DIR;
- private String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
@@ -62,23 +60,8 @@
CLASSES_DIR = System.getProperty("test.classes.directory");
ENDPOINT_CLASS = "org.jboss.test.ws.jaxws.jbws2529.JBWS2529Endpoint";
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if(origJavaHome.indexOf(FS + "jre")!=-1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
-
public void test() throws Exception
{
File destDir = new File(TEST_DIR, "wsprovide" + FS + "java");
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2591/JBWS2591TestCase.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2591/JBWS2591TestCase.java 2013-05-30 15:46:29 UTC (rev 17634)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2591/JBWS2591TestCase.java 2013-05-30 15:47:29 UTC (rev 17635)
@@ -46,30 +46,14 @@
private String JBOSS_HOME;
private String TEST_DIR;
- private String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
JBOSS_HOME = System.getProperty("jboss.home");
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if (origJavaHome.indexOf(FS + "jre") != -1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
-
public void testWSConsumeFromCommandLine() throws Exception
{
// use absolute path for the output to be re-usable
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2593/JBWS2593TestCase.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2593/JBWS2593TestCase.java 2013-05-30 15:46:29 UTC (rev 17634)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/jbws2593/JBWS2593TestCase.java 2013-05-30 15:47:29 UTC (rev 17635)
@@ -48,30 +48,14 @@
private String JBOSS_HOME;
private String TEST_DIR;
- private String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
JBOSS_HOME = System.getProperty("jboss.home");
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if (origJavaHome.indexOf(FS + "jre") != -1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
-
public void testRPC() throws Exception
{
this.internalTest(true);
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2013-05-30 15:46:29 UTC (rev 17634)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/testsuite/src/test/java/org/jboss/test/ws/jaxws/smoke/tools/ScriptTestCase.java 2013-05-30 15:47:29 UTC (rev 17635)
@@ -48,8 +48,6 @@
protected String CLASSES_DIR;
protected String TEST_DIR;
- protected String origJavaHome;
-
protected void setUp() throws Exception
{
super.setUp();
@@ -59,15 +57,6 @@
//JBWS-2479
ENDPOINT_CLASS = "org.jboss.test.ws.jaxws.smoke.tools.CalculatorBean";
TEST_DIR = createResourceFile("..").getAbsolutePath();
- origJavaHome = System.getProperty("java.home");
-
-
- // the script requires the system JAVA_HOME, which points to the JDK not the JRE
- if(origJavaHome.indexOf(FS + "jre")!=-1)
- {
- String JDK_HOME = origJavaHome.substring(0, origJavaHome.indexOf(FS + "jre"));
- System.setProperty("java.home", JDK_HOME);
- }
}
public void testScritpsAvailable()
@@ -77,10 +66,4 @@
assertTrue(new File(JBOSS_HOME + FS + "bin" + FS + "wsconsume" + ".sh").exists());
assertTrue(new File(JBOSS_HOME + FS + "bin" + FS + "wsconsume" + ".bat").exists());
}
-
- protected void tearDown() throws Exception
- {
- // reset surefire's JAVA_HOME
- System.setProperty("java.home", origJavaHome);
- }
}
11 years, 6 months
JBossWS SVN: r17634 - shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-30 11:46:29 -0400 (Thu, 30 May 2013)
New Revision: 17634
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
Log:
[BZ-927881] Synch with upstream
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2013-05-30 15:45:53 UTC (rev 17633)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTestHelper.java 2013-05-30 15:46:29 UTC (rev 17634)
@@ -61,9 +61,11 @@
private static final String SYSPROP_JBOSS_BIND_ADDRESS = "jboss.bind.address";
private static final String SYSPROP_TEST_ARCHIVE_DIRECTORY = "test.archive.directory";
private static final String SYSPROP_TEST_RESOURCES_DIRECTORY = "test.resources.directory";
+ private static final String SYSPROP_AS_SERVER_CONN_RETRIEVAL_ATTEMPTS = "test.as.server.connection.retrieval.attempts";
private static final String TEST_USERNAME = "test.username";
private static final String TEST_PASSWORD = "test.password";
private static final boolean DEPLOY_PROCESS_ENABLED = !Boolean.getBoolean("disable.test.archive.deployment");
+ private static final int AS_SERVER_CONN_RETRIEVAL_ATTEMPTS = Integer.getInteger(SYSPROP_AS_SERVER_CONN_RETRIEVAL_ATTEMPTS, 5);
private static Deployer DEPLOYER;
private static MBeanServerConnection server;
@@ -243,41 +245,49 @@
private static MBeanServerConnection getAS7ServerConnection(String integrationTarget)
{
- String host = getServerHost();
- String urlString = System.getProperty("jmx.service.url", "service:jmx:remoting-jmx://" + host + ":" + 9999);
- JMXServiceURL serviceURL = null;
- JMXConnector connector = null;
- try
- {
+ final String urlString = System.getProperty("jmx.service.url", "service:jmx:remoting-jmx://" + getServerHost() + ":" + 9999);
+ JMXServiceURL serviceURL = null;
+ JMXConnector connector = null;
+ try
+ {
serviceURL = new JMXServiceURL(urlString);
- }
- catch (MalformedURLException e1)
- {
- //NO_OP
- }
- //add more tries to get the connection. Workaround to fix some test failures caused by connection is not established in 5 seconds
- for (int i = 0 ; i < 5; i++) {
- try {
- connector = JMXConnectorFactory.connect(serviceURL, null);
- } catch (IOException ex) {
- throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, ex);
- } catch (RuntimeException e) {
- if (e.getMessage().contains("WAITING")) {
- continue;
- } else {
- throw e;
- }
- }
- }
-
- try
- {
+ }
+ catch (MalformedURLException e1)
+ {
+ throw new IllegalStateException(e1);
+ }
+ //add more tries to get the connection. Workaround to fix some test failures caused by connection is not established in 5 seconds
+ for (int i = 0; i < AS_SERVER_CONN_RETRIEVAL_ATTEMPTS && connector == null; i++)
+ {
+ try
+ {
+ connector = JMXConnectorFactory.connect(serviceURL, null);
+ }
+ catch (IOException ex)
+ {
+ throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, ex);
+ }
+ catch (RuntimeException e)
+ {
+ if (e.getMessage().contains("WAITING") && i < AS_SERVER_CONN_RETRIEVAL_ATTEMPTS - 1)
+ {
+ continue;
+ }
+ else
+ {
+ throw e;
+ }
+ }
+ }
+
+ try
+ {
return connector.getMBeanServerConnection();
- }
- catch (Exception e)
- {
- throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, e);
- }
+ }
+ catch (Exception e)
+ {
+ throw new IllegalStateException("Cannot obtain MBeanServerConnection to: " + urlString, e);
+ }
}
public static String getIntegrationTarget()
11 years, 6 months
JBossWS SVN: r17633 - shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2013-05-30 11:45:53 -0400 (Thu, 30 May 2013)
New Revision: 17633
Modified:
shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTest.java
Log:
[BZ927884] Synch with upstream
Modified: shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTest.java
===================================================================
--- shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2013-05-30 11:13:35 UTC (rev 17632)
+++ shared-testsuite/branches/jbossws-shared-testsuite-4.1.x/src/main/java/org/jboss/wsf/test/JBossWSTest.java 2013-05-30 15:45:53 UTC (rev 17633)
@@ -61,6 +61,8 @@
public abstract class JBossWSTest extends TestCase
{
protected static Logger log = Logger.getLogger(JBossWSTest.class.getName());
+ public static final String SYSPROP_COPY_JOB_TIMEOUT = "test.copy.job.timeout";
+ private static final int COPY_JOB_TIMEOUT = Integer.getInteger(SYSPROP_COPY_JOB_TIMEOUT, File.pathSeparatorChar == ':' ? 5000 : 60000); //60s on Windows, 5s on UNIX and Mac
public JBossWSTest()
{
@@ -171,16 +173,14 @@
CopyJob inputStreamJob = new CopyJob(p.getInputStream(), os == null ? System.out : os);
CopyJob errorStreamJob = new CopyJob(p.getErrorStream(), System.err);
// unfortunately the following threads are needed because of Windows behavior
- System.out.println("Process input stream:");
- System.err.println("Process error stream:");
Thread inputJob = new Thread(inputStreamJob);
Thread outputJob = new Thread(errorStreamJob);
try
{
inputJob.start();
- inputJob.join(60000);
+ inputJob.join(COPY_JOB_TIMEOUT);
outputJob.start();
- outputJob.join(60000);
+ outputJob.join(COPY_JOB_TIMEOUT);
int statusCode = p.waitFor();
String fallbackMessage = "Process did exit with status " + statusCode;
assertTrue(message != null ? message : fallbackMessage, statusCode == 0);
11 years, 6 months
JBossWS SVN: r17632 - stack/native/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-05-30 07:13:35 -0400 (Thu, 30 May 2013)
New Revision: 17632
Removed:
stack/native/branches/jbossws-native-3.1.2.SP11_JBPAPP-10758/
Log:
[JBPAPP-10758] Created one off branch in error
11 years, 6 months
JBossWS SVN: r17631 - stack/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-05-30 07:12:16 -0400 (Thu, 30 May 2013)
New Revision: 17631
Removed:
stack/cxf/branches/jbossws-cxf-3.1.2.SP9_JBPAPP-10758/
Log:
[JBPAPP-10758] Created one off branch in error
11 years, 6 months
JBossWS SVN: r17630 - thirdparty/cxf/branches.
by jbossws-commits@lists.jboss.org
Author: mmusaji
Date: 2013-05-30 07:10:02 -0400 (Thu, 30 May 2013)
New Revision: 17630
Removed:
thirdparty/cxf/branches/cxf-2.2.12-patch-02_JBPAPP-10758/
Log:
[JBPAPP-10758] Created one off branch in error
11 years, 6 months