Author: slaws
Date: Thu May 28 17:55:37 2009
New Revision: 779700
URL: http://svn.apache.org/viewvc?rev=779700&view=rev
Log:
TUSCANY-2978 - add some property tests
Modified:
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java
tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java
Modified:
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite?rev=779700&r1=779699&r2=779700&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite
(original)
+++
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ear-appcomp-contrib-implicit/src/main/application/META-INF/application.composite
Thu May 28 17:55:37 2009
@@ -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"/>
Modified:
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java?rev=779700&r1=779699&r2=779700&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java
(original)
+++
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/ejb-enhanced/src/main/java/sample/ejb3/HelloworldService8Bean.java
Thu May 28 17:55:37 2009
@@ -19,7 +19,8 @@
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 @@
@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;
Modified:
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java?rev=779700&r1=779699&r2=779700&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java
(original)
+++
tuscany/branches/sca-java-1.x/itest/contribution-jee-samples/jar-shared/src/main/java/sample/java/HelloworldServiceJavaImpl.java
Thu May 28 17:55:37 2009
@@ -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;
}
Modified:
tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java
URL:
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java?rev=779700&r1=779699&r2=779700&view=diff
==============================================================================
---
tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java
(original)
+++
tuscany/branches/sca-java-1.x/itest/contribution-jee/src/test/java/org/apache/tuscany/sca/test/contribution/jee/SCAJarEarAppcompTestCase.java
Thu May 28 17:55:37 2009
@@ -115,7 +115,7 @@
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();