summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/host-jetty/src/test/java/org
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-09-17 20:37:49 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-09-17 20:37:49 +0000
commitd0be875c6aacb02435860e82db3feebea99132ad (patch)
tree02c18b48dc59828e50a8815fe7280c68a70b77e4 /sca-java-2.x/trunk/modules/host-jetty/src/test/java/org
parent1bce2af6ab834ea0985d8ef855118c0a37dc794e (diff)
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
Diffstat (limited to 'sca-java-2.x/trunk/modules/host-jetty/src/test/java/org')
-rw-r--r--sca-java-2.x/trunk/modules/host-jetty/src/test/java/org/apache/tuscany/sca/http/jetty/JettyServerTestCase.java11
1 files changed, 7 insertions, 4 deletions
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 <T extends Runnable> void scheduleWork(T work) {
- Thread thread = new Thread(work);
- thread.start();
+ executorService.submit(work);
}
public <T extends Runnable> void scheduleWork(T work, NotificationListener<T> listener) {
scheduleWork(work);
}
- public void destroy() {
+ public ExecutorService getExecutorService() {
+ return executorService;
}
};