Author: antelder
Date: Thu Sep 8 10:09:34 2011
New Revision: 1166599
URL: http://svn.apache.org/viewvc?rev=1166599&view=rev
Log:
TUSCANY-3940: Apply patch from Greg Dritschler to Change
AsyncJDKInvocationHandler to use WorkScheduler directly
Modified:
tuscany/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java
Modified:
tuscany/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java?rev=1166599&r1=1166598&r2=1166599&view=diff
==============================================================================
---
tuscany/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java
(original)
+++
tuscany/sca-java-2.x/trunk/testing/itest/async-services/src/main/java/org/apache/tuscany/sca/itest/Service1ClientImpl.java
Thu Sep 8 10:09:34 2011
@@ -29,9 +29,9 @@ public class Service1ClientImpl implemen
@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 implemen
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 implemen
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) {
}
}