summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/samples/learning-more/async
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-10-15 17:41:56 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-10-15 17:41:56 +0000
commit4f66e17b36cf23a25d3930927aecc113633a611b (patch)
treee35b40884b03a78a5c465d86b90a87b3c9c52e8b /sca-java-2.x/trunk/samples/learning-more/async
parent34ea5dac5d95d94a9acbb4453dfeb097598e63a1 (diff)
Run up the async sample from the embedded launcher
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1023034 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/samples/learning-more/async')
-rw-r--r--sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java b/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java
index f27bf7f7f4..351ba9c5ef 100644
--- a/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java
+++ b/sca-java-2.x/trunk/samples/learning-more/async/calculator-contribution/src/main/java/calculator/CalculatorServiceProxyImpl.java
@@ -65,6 +65,11 @@ public class CalculatorServiceProxyImpl implements CalculatorServiceSync {
while (!response.isDone()){
System.out.println("Waiting for poll");
+ try {
+ Thread.sleep(500);
+ } catch (Exception ex) {
+ // do nothing
+ }
}
try {
@@ -84,6 +89,11 @@ public class CalculatorServiceProxyImpl implements CalculatorServiceSync {
while (!future.isDone()){
System.out.println("Waiting for callback");
+ try {
+ Thread.sleep(500);
+ } catch (Exception ex) {
+ // do nothing
+ }
}
return result;