summaryrefslogtreecommitdiffstats
path: root/branches
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-05-28 17:55:37 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-05-28 17:55:37 +0000
commit1c74e1e3677538fd77cb880282665e272653f694 (patch)
tree0069c2bf2b6e668d1221972cb0bf67d674186bbc /branches
parent8d8e068dde89a44c2428835f5be1df6463ab3f02 (diff)
TUSCANY-2978 - add some property tests
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@779700 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches')
-rw-r--r--branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite2
-rw-r--r--branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java10
-rw-r--r--branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java6
-rw-r--r--branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java2
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();