Author: thomas.diesler(a)jboss.com
Date: 2007-01-05 07:15:18 -0500 (Fri, 05 Jan 2007)
New Revision: 1811
Modified:
trunk/jbossws-tests/build.xml
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.java
Log:
Fix jdk-1.4 compile issues
Modified: trunk/jbossws-tests/build.xml
===================================================================
--- trunk/jbossws-tests/build.xml 2007-01-05 12:15:13 UTC (rev 1810)
+++ trunk/jbossws-tests/build.xml 2007-01-05 12:15:18 UTC (rev 1811)
@@ -96,8 +96,6 @@
<available property="jbossws.available"
file="${jboss.home}/client/jbossall-client.jar"/>
<available property="installer.setup"
file="jboss-ejb3-client.jar"/>
- <fail message="Not available: ${jboss.home}/client/jbossall-client.jar"
unless="jbossws.available"/>
-
<mkdir dir="${tests.output.dir}/log"/>
<touch file="${tests.output.dir}/logtest.log"/>
@@ -112,18 +110,29 @@
-->
<target name="init" depends="prepare,thirdparty">
+ <!-- Define the jbossws.build -->
+ <condition property="jbossws.build" value="jbossws14">
+ <not>
+ <isset property="HAVE_JDK_1.5"/>
+ </not>
+ </condition>
+ <condition property="jbossws.build" value="jbossws">
+ <isset property="HAVE_JDK_1.5"/>
+ </condition>
+ <property name="jbossws.client.jar"
value="${jbossws.build}-client.jar"/>
+
<!-- Define excluded tests -->
<property name="tests.excludesfile"
value="${tests.resources.dir}/tests-${jbossws.integration.target}-excludes.txt"/>
<!-- The jbossws client classpath -->
<path id="jbossws.client.classpath">
- <pathelement
location="${core.output.lib.dir}/jbossws-client.jar"/>
+ <pathelement location="${jboss.client}/${jbossws.client.jar}"/>
<pathelement location="${jboss.client}/activation.jar"/>
<pathelement location="${jboss.client}/commons-logging.jar"/>
<pathelement location="${jboss.client}/javassist.jar"/>
<pathelement location="${jboss.client}/jaxb-api.jar"/>
<pathelement location="${jboss.client}/jaxb-impl.jar"/>
- <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement
location="${jboss.client}/jboss-backport-concurrent.jar"/>
<pathelement location="${jboss.client}/jboss-common-core.jar"/>
<pathelement location="${jboss.client}/jboss-xml-binding.jar"/>
<pathelement location="${jboss.client}/jboss-logging-spi.jar"/>
@@ -131,6 +140,8 @@
<pathelement location="${jboss.client}/jboss-jaxrpc.jar"/>
<pathelement location="${jboss.client}/jboss-jaxws.jar"/>
<pathelement location="${jboss.client}/jboss-saaj.jar"/>
+ <pathelement location="${jboss.client}/jbossall-client.jar"/>
+ <pathelement location="${jboss.client}/jbossretro-rt.jar"/>
<pathelement location="${jboss.client}/log4j.jar"/>
<pathelement location="${jboss.client}/mail.jar"/>
<pathelement location="${jboss.lib}/jboss-container.jar"/>
Modified: trunk/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java
===================================================================
--- trunk/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java 2007-01-05
12:15:13 UTC (rev 1810)
+++ trunk/jbossws-tests/src/main/java/org/jboss/test/ws/TomcatTestDeployer.java 2007-01-05
12:15:18 UTC (rev 1811)
@@ -25,6 +25,7 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.lang.reflect.Method;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
@@ -33,7 +34,6 @@
import java.util.Map;
import org.jboss.util.Base64;
-import org.jboss.ws.integration.tomcat.wspublish;
/**
* A deployer that deploys to Tomcat
@@ -59,7 +59,11 @@
File destDir = new File(new File(url.getFile()).getParent() +
"/wspublish");
destDir.mkdirs();
- URL warURL = new wspublish().process(url, destDir, null);
+ // Use reflection to invoke wspublish.process() from the tomcat integration layer
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ Class wspublishClass =
loader.loadClass("org.jboss.ws.integration.tomcat.wspublish");
+ Method process = wspublishClass.getMethod("process", new
Class[]{URL.class, File.class, String.class});
+ URL warURL = (URL)process.invoke(wspublishClass.newInstance(), new Object[]{url,
destDir, null});
String path = warURL.toExternalForm();
path = path.substring(path.lastIndexOf("/"));
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java 2007-01-05
12:15:13 UTC (rev 1810)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/dynamichandler/DynamicHandlerTestCase.java 2007-01-05
12:15:18 UTC (rev 1811)
@@ -101,11 +101,11 @@
ObjectName oname =
ObjectNameFactory.create("jboss.ws:service=ServiceEndpointManager");
ObjectName serviceID = new
ObjectName("jboss.ws:context=jaxrpc-samples-dynamichandler,endpoint=TestService");
- List<HandlerMetaData> handlers =
(List<HandlerMetaData>)server.invoke(oname, "getHandlerMetaData", new
Object[]{serviceID}, new String[]{"javax.management.ObjectName"});
- Iterator<HandlerMetaData> it = handlers.iterator();
+ List handlers = (List)server.invoke(oname, "getHandlerMetaData", new
Object[]{serviceID}, new String[]{"javax.management.ObjectName"});
+ Iterator it = handlers.iterator();
while (it.hasNext())
{
- HandlerMetaData handlerMetaData = it.next();
+ HandlerMetaData handlerMetaData = (HandlerMetaData)it.next();
if
(handlerMetaData.getHandlerClassName().equals(ServerSideHandler.class.getName()))
it.remove();
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.java 2007-01-05
12:15:13 UTC (rev 1810)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxrpc/samples/jmstransport/JMSTransportTestCase.java 2007-01-05
12:15:18 UTC (rev 1811)
@@ -8,8 +8,6 @@
// $Id$
-import java.util.concurrent.CountDownLatch;
-
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.Queue;
@@ -36,11 +34,8 @@
*/
public class JMSTransportTestCase extends JBossWSTest
{
- private static CountDownLatch count;
-
public static Test suite() throws Exception
{
- count = new CountDownLatch(1);
return JBossWSTestSetup.newTestSetup(JMSTransportTestCase.class,
"jaxrpc-samples-jmstransport.sar");
}
@@ -93,8 +88,6 @@
sender.send(message);
sender.close();
- // Please explain to me why this does not work relieably
- // count.await();
Thread.sleep(500);
assertNotNull("Expected response message", responseListener.resMessage);
@@ -114,7 +107,6 @@
TextMessage textMessage = (TextMessage)msg;
try
{
- count.countDown();
resMessage = textMessage.getText();
}
catch (Throwable t)
Show replies by date