diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-08 10:09:34 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-08 10:09:34 +0000 |
commit | 3a6bea46ba20cd39274d949a66171f9ff8e3ed79 (patch) | |
tree | be612076fe5f18a581020b6a80effaa92f48b513 | |
parent | 0b7fe79054c5cbb43913561edc97f60da3277ba8 (diff) |
TUSCANY-3940: Apply patch from Greg Dritschler to Change AsyncJDKInvocationHandler to use WorkScheduler directly
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1166599 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java index acc92d002c..d45acdcde9 100644 --- a/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java +++ b/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java @@ -29,9 +29,9 @@ public class Service1ClientImpl implements Service1 { @Reference
Service1AsyncClient service1;
- static Object threeMutex = new Object();
- static String threeResp;
- static Throwable threeEx;
+ Object threeMutex = new Object();
+ String threeResp;
+ Throwable threeEx;
@Override
public String operation1(String input) {
@@ -60,10 +60,12 @@ public class Service1ClientImpl implements Service1 { private String invokeAsyncType2(String input) {
// three
+ System.out.println("invokeAsyncType2 entry");
AsyncHandler<String> ah = new AsyncHandler<String>() {
@Override
public void handleResponse(Response<String> res) {
try {
+ System.out.println("invokeAsyncType2 callback handler invoked");
threeResp = res.get();
} catch (Throwable e) {
threeEx = e;
@@ -78,7 +80,8 @@ public class Service1ClientImpl implements Service1 { synchronized (threeMutex) {
if (threeResp == null && threeEx == null) {
try {
- threeMutex.wait(3000);
+ threeMutex.wait(15000);
+ System.out.println("invokeAsyncType2 mutex notified or wait expired");
} catch (InterruptedException e) {
}
}
|