From d0be875c6aacb02435860e82db3feebea99132ad Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 17 Sep 2010 20:37:49 +0000 Subject: Enhance the JAX-WS async client support and fix couple of issues git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@998309 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/tuscany/sca/http/jetty/JettyServerTestCase.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'sca-java-2.x/trunk/modules/host-jetty/src/test/java') diff --git a/sca-java-2.x/trunk/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java b/sca-java-2.x/trunk/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java index a3199cf4d1..a83246174c 100644 --- a/sca-java-2.x/trunk/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java +++ b/sca-java-2.x/trunk/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java @@ -27,6 +27,8 @@ import java.net.ConnectException; import java.net.InetAddress; import java.net.Socket; import java.net.URL; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.HttpsURLConnection; @@ -70,17 +72,18 @@ public class JettyServerTestCase extends TestCase { private static final int HTTP_PORT = 8085; private WorkScheduler workScheduler = new WorkScheduler() { - + private ExecutorService executorService = Executors.newCachedThreadPool(); + public void scheduleWork(T work) { - Thread thread = new Thread(work); - thread.start(); + executorService.submit(work); } public void scheduleWork(T work, NotificationListener listener) { scheduleWork(work); } - public void destroy() { + public ExecutorService getExecutorService() { + return executorService; } }; -- cgit v1.2.3