diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-29 09:13:22 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-09-29 09:13:22 +0000 |
commit | 125fc8e7f4f5b350802f1d828694fb105a094622 (patch) | |
tree | ca192a8bdd0c45d28cc2deb22707ad3ec3650d1e /sca-java-2.x/trunk/samples/getting-started | |
parent | 1e963e83764fa50b2cd8a21c8efe23b94710b297 (diff) |
Add eargerInint and init method
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1002529 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/samples/getting-started')
-rw-r--r-- | sca-java-2.x/trunk/samples/getting-started/contribution-helloworld/src/main/java/sample/HelloworldImpl.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/samples/getting-started/contribution-helloworld/src/main/java/sample/HelloworldImpl.java b/sca-java-2.x/trunk/samples/getting-started/contribution-helloworld/src/main/java/sample/HelloworldImpl.java index 5bf6a94505..aa563cbdf3 100644 --- a/sca-java-2.x/trunk/samples/getting-started/contribution-helloworld/src/main/java/sample/HelloworldImpl.java +++ b/sca-java-2.x/trunk/samples/getting-started/contribution-helloworld/src/main/java/sample/HelloworldImpl.java @@ -18,6 +18,11 @@ */
package sample;
+import org.oasisopen.sca.annotation.Init;
+import org.oasisopen.sca.annotation.Scope;
+import org.oasisopen.sca.annotation.EagerInit;
+
+@Scope("COMPOSITE") @EagerInit
public class HelloworldImpl implements Helloworld {
public String sayHello(String name) {
@@ -25,4 +30,8 @@ public class HelloworldImpl implements Helloworld { return "Hello " + name;
}
+ @Init
+ public void init() {
+ System.out.println(sayHello("world"));
+ }
}
|