JBossWS SVN: r7141 - in container/jboss50/branches/jbossws-jboss501/src/main: resources/jbossws-jboss50-container.jar/META-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-22 11:38:13 -0400 (Thu, 22 May 2008)
New Revision: 7141
Modified:
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java
container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
Log:
[JBWS-2188] implement missing bits - deployment factory must be called in endpoint API transport
Modified: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-22 15:27:38 UTC (rev 7140)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-22 15:38:13 UTC (rev 7141)
@@ -46,6 +46,7 @@
import javax.xml.ws.WebServiceException;
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
import java.util.Map;
import java.util.HashMap;
@@ -54,8 +55,8 @@
*/
public class EndpointAPIHttpTransportManager implements TransportManager
{
- private static Logger log = Logger.getLogger(EndpointAPIHttpTransportManager.class);
-
+ private static final String PROCESSED_BY_DEPLOYMENT_FACTORY = "processed.by.deployment.factory";
+ private WebAppDeploymentFactory deploymentFactory;
private WebAppGenerator generator;
private DeploymentFactory factory = new DeploymentFactory();
@@ -76,7 +77,15 @@
// Create JBossWebMetaData and attach it to the DeploymentUnit
Deployment topLevelDeployment = endpoint.getService().getDeployment();
- JBossWebMetaData jbwMetaData = generator.create(topLevelDeployment);
+
+ // TODO: JBWS-2188
+ Boolean alreadyDeployed = (Boolean)topLevelDeployment.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
+ if ((alreadyDeployed == null) || (false == alreadyDeployed))
+ {
+ JBossWebMetaData jbwMetaData = generator.create(topLevelDeployment);
+ deploymentFactory.create(topLevelDeployment, jbwMetaData);
+ topLevelDeployment.setProperty(PROCESSED_BY_DEPLOYMENT_FACTORY, Boolean.TRUE);
+ }
// Server config
SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
@@ -92,8 +101,8 @@
String ctx = httpSpec.getWebContext();
String pattern = httpSpec.getUrlPattern();
listenerRef = new HttpListenerRef( ctx, pattern, new URI("http://"+hostAndPort+ctx+pattern) );
-
- } catch (URISyntaxException e)
+ }
+ catch (URISyntaxException e)
{
throw new RuntimeException("Failed to create ListenerRef", e);
}
@@ -105,17 +114,34 @@
deploymentRegistry.put( listenerRef.getUUID(), topLevelDeployment );
return listenerRef;
-
}
public void destroyListener(ListenerRef ref)
{
Deployment dep = deploymentRegistry.get(ref.getUUID());
- if(null==dep)
- throw new IllegalArgumentException("Unknown ListenerRef " + ref);
+ if (dep != null)
+ {
+ // TODO: JBWS-2188
+ Boolean alreadyDeployed = (Boolean)dep.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
+ if ((alreadyDeployed != null) && (true == alreadyDeployed))
+ {
+ try
+ {
+ undeploy(dep);
+ deploymentFactory.destroy(dep);
+ }
+ finally
+ {
+ deploymentRegistry.remove(ref.getUUID());
+ }
+ dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
+ }
+ }
+ }
- undeploy(dep);
- deploymentRegistry.remove(ref.getUUID());
+ public void setDeploymentFactory(WebAppDeploymentFactory deploymentFactory)
+ {
+ this.deploymentFactory = deploymentFactory;
}
public void setGenerator(WebAppGenerator generator)
Modified: container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java 2008-05-22 15:27:38 UTC (rev 7140)
+++ container/jboss50/branches/jbossws-jboss501/src/main/java/org/jboss/wsf/container/jboss50/transport/WebAppDeploymentFactory.java 2008-05-22 15:38:13 UTC (rev 7141)
@@ -42,9 +42,6 @@
*/
public class WebAppDeploymentFactory
{
- // provide logging
- private static Logger log = Logger.getLogger(WebAppDeploymentFactory.class);
-
private WebMetaDataModifier webMetaDataModifier;
public void setWebMetaDataModifier(WebMetaDataModifier webMetaDataModifier)
Modified: container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-05-22 15:27:38 UTC (rev 7140)
+++ container/jboss50/branches/jbossws-jboss501/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-05-22 15:38:13 UTC (rev 7141)
@@ -83,6 +83,7 @@
<bean name="EndpointAPIHttpTransport" class="org.jboss.wsf.container.jboss50.transport.EndpointAPIHttpTransportManager">
<property name="generator"><inject bean="WSWebAppGenerator"/></property>
+ <property name="deploymentFactory"><inject bean="WSWebAppDeploymentFactory"/></property>
<property name="mainDeployer"><inject bean="MainDeployer"/></property>
<property name="webMetaDataModifier"><inject bean="WSWebMetaDataModifier"/></property>
</bean>
16 years, 8 months
JBossWS SVN: r7140 - in container/jboss50/branches/jbossws-jboss500/src/main: resources/jbossws-jboss50-container.jar/META-INF and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-22 11:27:38 -0400 (Thu, 22 May 2008)
New Revision: 7140
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
Log:
[JBWS-2188] implement missing bits - deployment factory must be called in endpoint API transport
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-22 14:58:31 UTC (rev 7139)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-22 15:27:38 UTC (rev 7140)
@@ -35,6 +35,7 @@
import java.net.URI;
import java.net.URISyntaxException;
+import java.net.URL;
import java.util.Map;
import java.util.HashMap;
@@ -44,6 +45,7 @@
public class EndpointAPIHttpTransportManager implements TransportManager
{
private static final String PROCESSED_BY_DEPLOYMENT_FACTORY = "processed.by.deployment.factory";
+ private WebAppDeploymentFactory deploymentFactory;
private WebAppGenerator generator;
private Map<String, Deployment> deploymentRegistry = new HashMap<String, Deployment>();
@@ -63,7 +65,8 @@
Boolean alreadyDeployed = (Boolean)topLevelDeployment.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
if ((alreadyDeployed == null) || (false == alreadyDeployed))
{
- generator.create(topLevelDeployment);
+ URL webAppURL = generator.create(topLevelDeployment);
+ deploymentFactory.create(topLevelDeployment, webAppURL);
topLevelDeployment.setProperty(PROCESSED_BY_DEPLOYMENT_FACTORY, Boolean.TRUE);
}
@@ -102,12 +105,24 @@
Boolean alreadyDeployed = (Boolean)dep.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
if ((alreadyDeployed != null) && (true == alreadyDeployed))
{
- deploymentRegistry.remove(ref.getUUID());
+ try
+ {
+ deploymentFactory.destroy(dep);
+ }
+ finally
+ {
+ deploymentRegistry.remove(ref.getUUID());
+ }
dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
}
}
}
+ public void setDeploymentFactory(WebAppDeploymentFactory deploymentFactory)
+ {
+ this.deploymentFactory = deploymentFactory;
+ }
+
public void setGenerator(WebAppGenerator generator)
{
this.generator = generator;
Modified: container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-05-22 14:58:31 UTC (rev 7139)
+++ container/jboss50/branches/jbossws-jboss500/src/main/resources/jbossws-jboss50-container.jar/META-INF/jbossws-container-beans.xml 2008-05-22 15:27:38 UTC (rev 7140)
@@ -83,6 +83,7 @@
<bean name="EndpointAPIHttpTransport" class="org.jboss.wsf.container.jboss50.transport.EndpointAPIHttpTransportManager">
<property name="generator"><inject bean="WSWebAppGenerator"/></property>
+ <property name="deploymentFactory"><inject bean="WSWebAppDeploymentFactory"/></property>
</bean>
<!-- Dynamically creates web apps in memory -->
16 years, 8 months
JBossWS SVN: r7139 - container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-22 10:58:31 -0400 (Thu, 22 May 2008)
New Revision: 7139
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
Log:
[JBWS-2188] repair wrong commit
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-22 14:56:13 UTC (rev 7138)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-22 14:58:31 UTC (rev 7139)
@@ -102,14 +102,7 @@
Boolean alreadyDeployed = (Boolean)dep.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
if ((alreadyDeployed != null) && (true == alreadyDeployed))
{
- try
- {
- deploymentFactory.destroy(dep);
- }
- finally
- {
- deploymentRegistry.remove(ref.getUUID());
- }
+ deploymentRegistry.remove(ref.getUUID());
dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
}
}
16 years, 8 months
JBossWS SVN: r7138 - container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-22 10:56:13 -0400 (Thu, 22 May 2008)
New Revision: 7138
Modified:
container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
Log:
[JBWS-2188] call deploymentFactory only once per whole deployment - not for each endpoint
Modified: container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java
===================================================================
--- container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-22 14:43:57 UTC (rev 7137)
+++ container/jboss50/branches/jbossws-jboss500/src/main/java/org/jboss/wsf/container/jboss50/transport/EndpointAPIHttpTransportManager.java 2008-05-22 14:56:13 UTC (rev 7138)
@@ -43,6 +43,7 @@
*/
public class EndpointAPIHttpTransportManager implements TransportManager
{
+ private static final String PROCESSED_BY_DEPLOYMENT_FACTORY = "processed.by.deployment.factory";
private WebAppGenerator generator;
private Map<String, Deployment> deploymentRegistry = new HashMap<String, Deployment>();
@@ -57,7 +58,14 @@
// Create jboss web app data and attach it to the Deployment
Deployment topLevelDeployment = endpoint.getService().getDeployment();
- generator.create(topLevelDeployment);
+
+ // TODO: JBWS-2188
+ Boolean alreadyDeployed = (Boolean)topLevelDeployment.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
+ if ((alreadyDeployed == null) || (false == alreadyDeployed))
+ {
+ generator.create(topLevelDeployment);
+ topLevelDeployment.setProperty(PROCESSED_BY_DEPLOYMENT_FACTORY, Boolean.TRUE);
+ }
// Server config
SPIProvider provider = SPIProviderResolver.getInstance().getProvider();
@@ -88,10 +96,23 @@
public void destroyListener(ListenerRef ref)
{
Deployment dep = deploymentRegistry.get(ref.getUUID());
- if(null==dep)
- throw new IllegalArgumentException("Unknown ListenerRef " + ref);
-
- deploymentRegistry.remove(ref.getUUID());
+ if (dep != null)
+ {
+ // TODO: JBWS-2188
+ Boolean alreadyDeployed = (Boolean)dep.getProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
+ if ((alreadyDeployed != null) && (true == alreadyDeployed))
+ {
+ try
+ {
+ deploymentFactory.destroy(dep);
+ }
+ finally
+ {
+ deploymentRegistry.remove(ref.getUUID());
+ }
+ dep.removeProperty(PROCESSED_BY_DEPLOYMENT_FACTORY);
+ }
+ }
}
public void setGenerator(WebAppGenerator generator)
16 years, 8 months
JBossWS SVN: r7137 - stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl.
by jbossws-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-05-22 10:43:57 -0400 (Thu, 22 May 2008)
New Revision: 7137
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
Log:
Rostore previous classpath handling
Modified: stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2008-05-22 14:35:24 UTC (rev 7136)
+++ stack/native/trunk/modules/core/src/main/java/org/jboss/ws/tools/jaxws/impl/SunRIConsumerImpl.java 2008-05-22 14:43:57 UTC (rev 7137)
@@ -210,14 +210,14 @@
// See WsimportTool#compileGeneratedClasses()
String orgJavaClassPath = System.getProperty("java.class.path");
- String javaClassPath = (orgJavaClassPath != null ? orgJavaClassPath : "");
if(additionalCompilerClassPath.isEmpty() == false)
{
- for(String pathElement : additionalCompilerClassPath)
+ StringBuffer javaCP = new StringBuffer();
+ for(String s : additionalCompilerClassPath)
{
- javaClassPath += pathElement + File.pathSeparator;
+ javaCP.append(s).append(File.pathSeparator);
}
- System.setProperty("java.class.path", javaClassPath);
+ System.setProperty("java.class.path", javaCP.toString());
}
try
@@ -239,20 +239,11 @@
{
rte.printStackTrace();
}
-
throw rte;
}
finally
{
- // restore the original value of the java.class.path property
- if (orgJavaClassPath != null)
- {
- System.setProperty("java.class.path", orgJavaClassPath);
- }
- else
- {
- System.clearProperty("java.class.path");
- }
+ System.setProperty("java.class.path", orgJavaClassPath);
}
}
}
16 years, 8 months
JBossWS SVN: r7136 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-05-22 10:35:24 -0400 (Thu, 22 May 2008)
New Revision: 7136
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
Log:
Updating exclude file
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-05-22 12:51:08 UTC (rev 7135)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-05-22 14:35:24 UTC (rev 7136)
@@ -14,6 +14,7 @@
# [JBAS-5055] Failed to load users/passwords/role files
org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.*
org/jboss/test/ws/jaxws/jbws1840/JBWS1840TestCase.*
+org/jboss/test/ws/jaxws/context/WebServiceContextEJBTestCase.*
# [JBAS-5114] MessageDriven EJB3 does not create destination automatically
org/jboss/test/ws/jaxws/samples/jmstransport/**
16 years, 8 months
JBossWS SVN: r7135 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-05-22 08:51:08 -0400 (Thu, 22 May 2008)
New Revision: 7135
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
Log:
Updating exclude files
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-05-22 10:11:59 UTC (rev 7134)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-05-22 12:51:08 UTC (rev 7135)
@@ -128,3 +128,4 @@
org/jboss/test/ws/jaxws/jbws1799/**
org/jboss/test/ws/jaxws/jbws1872/**
org/jboss/test/ws/jaxws/jbws1969/**
+org/jboss/test/ws/projectGenerator/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-05-22 10:11:59 UTC (rev 7134)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-05-22 12:51:08 UTC (rev 7135)
@@ -136,3 +136,4 @@
org/jboss/test/ws/jaxws/jbws1799/**
org/jboss/test/ws/jaxws/jbws1872/**
org/jboss/test/ws/jaxws/jbws1969/**
+org/jboss/test/ws/projectGenerator/**
16 years, 8 months
JBossWS SVN: r7134 - stack/native/trunk/modules/testsuite/native-tests.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2008-05-22 06:11:59 -0400 (Thu, 22 May 2008)
New Revision: 7134
Modified:
stack/native/trunk/modules/testsuite/native-tests/pom.xml
Log:
don't forget to build interop archives
Modified: stack/native/trunk/modules/testsuite/native-tests/pom.xml
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/pom.xml 2008-05-22 09:49:39 UTC (rev 7133)
+++ stack/native/trunk/modules/testsuite/native-tests/pom.xml 2008-05-22 10:11:59 UTC (rev 7134)
@@ -105,6 +105,7 @@
<ant antfile="scripts/build-samples-jaxrpc.xml" target="build-samples-jaxrpc"/>
<ant antfile="scripts/build-jars-jaxws.xml" target="build-jars-jaxws"/>
<ant antfile="scripts/build-samples-jaxws.xml" target="build-samples-jaxws"/>
+ <ant antfile="scripts/build-jars-interop.xml" target="build-jars-interop"/>
</tasks>
</configuration>
</execution>
16 years, 8 months
JBossWS SVN: r7133 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-05-22 05:49:39 -0400 (Thu, 22 May 2008)
New Revision: 7133
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
Log:
Updating exclude files
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-05-22 09:49:08 UTC (rev 7132)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt 2008-05-22 09:49:39 UTC (rev 7133)
@@ -14,10 +14,11 @@
# [JBAS-5055] Failed to load users/passwords/role files
org/jboss/test/ws/jaxws/webserviceref/StubPropertyTestCase.*
org/jboss/test/ws/jaxws/jbws1840/JBWS1840TestCase.*
+org/jboss/test/ws/jaxws/samples/dar/**
# [JBAS-5114] MessageDriven EJB3 does not create destination automatically
org/jboss/test/ws/jaxws/samples/jmstransport/**
-org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.*
+org/jboss/test/ws/jaxws/samples/dar/**
# [JBAS-5115] Valid jboss-app.xml file not recognized correctly by jbossxb runtime
org/jboss/test/ws/jaxws/jbws1822/JBWS1822TestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-05-22 09:49:08 UTC (rev 7132)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2008-05-22 09:49:39 UTC (rev 7133)
@@ -17,7 +17,7 @@
# [JBAS-5114] MessageDriven EJB3 does not create destination automatically
org/jboss/test/ws/jaxws/samples/jmstransport/**
-org/jboss/test/ws/jaxws/samples/dar/JMSClientTestCase.*
+org/jboss/test/ws/jaxws/samples/dar/**
# [JBAS-5115] Valid jboss-app.xml file not recognized correctly by jbossxb runtime
org/jboss/test/ws/jaxws/jbws1822/JBWS1822TestCase.*
16 years, 8 months
JBossWS SVN: r7132 - stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2008-05-22 05:49:08 -0400 (Thu, 22 May 2008)
New Revision: 7132
Modified:
stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java
Log:
[JBWS-2030] Making AddressingClientTestCase more strict
Modified: stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java
===================================================================
--- stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java 2008-05-22 09:30:44 UTC (rev 7131)
+++ stack/native/trunk/modules/testsuite/native-tests/src/test/java/org/jboss/test/ws/jaxws/samples/dar/AddressingClientTestCase.java 2008-05-22 09:49:08 UTC (rev 7132)
@@ -26,21 +26,24 @@
import java.net.URL;
import java.util.Date;
+import javax.management.ObjectName;
+
import junit.framework.Test;
+import org.jboss.wsf.common.ObjectNameFactory;
import org.jboss.wsf.test.JBossWSTest;
import org.jboss.wsf.test.JBossWSTestSetup;
/**
* DAR addressing client; invokes the DAR addressing endpoint (sync, asynch and oneway)
- * (this is actually a weak test since we can't check if the
- * reply-to-service actually receives the response)
*
* @author Thomas.Diesler(a)jboss.org
* @since 24-Nov-2005
*/
public class AddressingClientTestCase extends JBossWSTest
{
+ private static final int TEST_RUN_TIME = 6000;
+
public static Test suite()
{
return new JBossWSTestSetup(AddressingClientTestCase.class, "jaxws-samples-dar-addressing-client.war,jaxws-samples-dar-addressing.jar");
@@ -53,7 +56,7 @@
Date start = new Date();
client.run(false);
Date stop = new Date();
- assertTrue(stop.getTime() - start.getTime() > 3000);
+ assertTrue(stop.getTime() - start.getTime() > TEST_RUN_TIME / 2);
}
public void testAsync() throws Exception
@@ -63,16 +66,25 @@
Date start = new Date();
client.run(true);
Date stop = new Date();
- assertTrue(stop.getTime() - start.getTime() > 3000);
+ assertTrue(stop.getTime() - start.getTime() > TEST_RUN_TIME / 2);
}
public void testOneWay() throws Exception
{
URL wsdlURL = new URL("http://" + getServerHost() + ":8080/dar?wsdl");
+ long count = getRequestCount("dar-client", "ReplyService");
AddressingClient client = new AddressingClient(wsdlURL, getServerHost());
Date start = new Date();
client.runOneway();
Date stop = new Date();
- assertTrue(stop.getTime() - start.getTime() < 3000);
+ assertTrue(stop.getTime() - start.getTime() < TEST_RUN_TIME / 2);
+ Thread.sleep(TEST_RUN_TIME);
+ assertEquals(count + 1, getRequestCount("dar-client", "ReplyService"));
}
+
+ private long getRequestCount(String context, String endpoint) throws Exception
+ {
+ ObjectName oname = ObjectNameFactory.create("jboss.ws:context=" + context + ",endpoint=" + endpoint);
+ return (Long)getServer().getAttribute(oname, "RequestCount");
+ }
}
16 years, 8 months