diff options
Diffstat (limited to '')
4 files changed, 15 insertions, 5 deletions
diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite index 9063702011..68bad37326 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite @@ -29,6 +29,7 @@ <binding.sca/> </service> <reference name="hwReference" target="HelloworldServiceJavaComponent"/> + <property name="hwProperty">EJB</property> </component> <service name="TheService" promote="HelloworldServiceComponent/HelloworldService8"/> @@ -37,6 +38,7 @@ <component name="HelloworldServiceJavaComponent"> <implementation.java class="sample.java.HelloworldServiceJavaImpl"/> + <property name="hwProperty">Java</property> </component> <service name="JavaService" promote="HelloworldServiceJavaComponent/HelloworldServiceJava"/> diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java index 6d90aaead1..a6d7f2dd04 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java @@ -19,7 +19,8 @@ package sample.ejb3; import javax.ejb.Stateless; -//import org.osoa.sca.annotations.Reference; +import org.osoa.sca.annotations.Property; +import org.osoa.sca.annotations.Reference; /** * HelloworldService EJB implementation SCA enhancement @@ -28,8 +29,11 @@ import javax.ejb.Stateless; @Stateless public class HelloworldService8Bean implements HelloworldService8, HelloworldLocal8 { - //@Reference - //protected HelloworldService8 hwReference; + @Reference + protected HelloworldService8 hwReference; + + @Property + protected String hwProperty; public String getGreetings(String name) { String greeting = "Hello remote " + name; diff --git a/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java b/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java index 59182b2e73..265af5b3a0 100644 --- a/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java +++ b/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java @@ -17,15 +17,19 @@ package sample.java; +import org.osoa.sca.annotations.Property; import org.osoa.sca.annotations.Reference; public class HelloworldServiceJavaImpl implements HelloworldServiceJava { @Reference protected HelloworldServiceJava hwReference; + + @Property + protected String hwProperty; public String getGreetings(String name) { - String greeting = hwReference.getGreetings(name); + String greeting = hwReference.getGreetings(name) + " " + hwProperty; System.out.println(greeting); return greeting; } diff --git a/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java b/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java index 4d704162ef..0200677a92 100644 --- a/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java +++ b/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java @@ -115,7 +115,7 @@ public class SCAJarEarAppcompTestCase { domain.getCompositeActivator().start(composite); HelloworldClient2 client = domain.getService(HelloworldClient2.class, "HelloworldClientComponent"); - Assert.assertEquals("Hello Fred", client.getGreetings("Fred")); + Assert.assertEquals("Hello Fred Java", client.getGreetings("Fred")); domain.stop(); |