summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sca-java-2.x/trunk/samples/getting-started/contribution-helloworld/src/main/java/sample/HelloworldImpl.java9
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"));
+ }
}