diff options
Diffstat (limited to 'java/sca')
-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> |