diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-25 19:08:15 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-06-25 19:08:15 +0000 |
commit | a2cab5688e3d242ee3b3c090c66351b9e5921a67 (patch) | |
tree | 90e94d3277002c6accc38805831fb7ec877d56e0 /java | |
parent | b276bed897f2b345797e1f1918118bdf875e9b28 (diff) |
Make the server wait and make the client impl call the server on init as there is no one to call the client operation in this case
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@788467 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r-- | java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java | 10 | ||||
-rw-r--r-- | java/sca/itest/nodes/two-nodes-two-vms-test/server.xml | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java b/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java index a8e74be096..b10d9d37b2 100644 --- a/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java +++ b/java/sca/itest/nodes/helloworld-client/src/main/java/itest/nodes/HelloworldImpl.java @@ -19,13 +19,23 @@ package itest.nodes;
+import org.oasisopen.sca.annotation.EagerInit;
+import org.oasisopen.sca.annotation.Init;
import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Scope;
+@EagerInit
+@Scope("COMPOSITE")
public class HelloworldImpl implements Helloworld {
@Reference
public Helloworld service;
+ @Init
+ public void initialize(){
+ System.out.println(">>>>>> " + sayHello("init"));
+ }
+
public String sayHello(String name) {
return "Hi " + service.sayHello(name);
}
diff --git a/java/sca/itest/nodes/two-nodes-two-vms-test/server.xml b/java/sca/itest/nodes/two-nodes-two-vms-test/server.xml index ebbb4fe237..7ff376565d 100644 --- a/java/sca/itest/nodes/two-nodes-two-vms-test/server.xml +++ b/java/sca/itest/nodes/two-nodes-two-vms-test/server.xml @@ -23,8 +23,8 @@ <target name="run"> <java classpath="${runtime_classpath}" classname="org.apache.tuscany.sca.node.launcher.NodeMain" fork="true"> <!--jvmarg value="-Djava.util.logging.config.file=../logging.properties"/--> - <arg value="-ttl"/> - <arg value="0"/> + <!--arg value="-ttl"/> + <arg value="0"/--> <arg value="-node"/> <arg value="file:./server-config.xml"/> </java> |