summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/samples/launcher-embedded-jse/build.xml14
-rw-r--r--sca-java-2.x/trunk/samples/launcher-embedded-jse/pom.xml18
-rw-r--r--sca-java-2.x/trunk/samples/launcher-embedded-jse/src/main/java/launcher/SampleJSELauncher.java16
-rw-r--r--sca-java-2.x/trunk/samples/launcher-embedded-jse/src/test/java/launcher/LauncherTestCase.java16
-rw-r--r--sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/calculator/CalculatorService.java3
5 files changed, 46 insertions, 21 deletions
diff --git a/sca-java-2.x/trunk/samples/launcher-embedded-jse/build.xml b/sca-java-2.x/trunk/samples/launcher-embedded-jse/build.xml
index 62cb57704d..65ce68e8b6 100644
--- a/sca-java-2.x/trunk/samples/launcher-embedded-jse/build.xml
+++ b/sca-java-2.x/trunk/samples/launcher-embedded-jse/build.xml
@@ -95,5 +95,19 @@
<arg value="contribution-binding-rmi-calculator"/>
</java>
</target>
+
+ <target name="run-contribution-implementation-java-calculator" depends="compile">
+ <java classname="${main.class}"
+ fork="true"
+ failonerror="true">
+ <classpath>
+ <pathelement location="target/${jar.name}"/>
+ <fileset dir="${tuscany.home}/features">
+ <include name="tuscany-sca-manifest.jar" />
+ </fileset>
+ </classpath>
+ <arg value="contribution-implementaton-java-calculator"/>
+ </java>
+ </target>
</project>
diff --git a/sca-java-2.x/trunk/samples/launcher-embedded-jse/pom.xml b/sca-java-2.x/trunk/samples/launcher-embedded-jse/pom.xml
index f707b720ac..89d68130db 100644
--- a/sca-java-2.x/trunk/samples/launcher-embedded-jse/pom.xml
+++ b/sca-java-2.x/trunk/samples/launcher-embedded-jse/pom.xml
@@ -38,24 +38,10 @@
<dependencies>
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-feature-api</artifactId>
+ <artifactId>tuscany-feature-all</artifactId>
<type>pom</type>
<version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-feature-core</artifactId>
- <type>pom</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-feature-binding-ws</artifactId>
- <type>pom</type>
- <version>2.0-SNAPSHOT</version>
- </dependency>
+ </dependency>
<dependency>
<groupId>junit</groupId>
diff --git a/sca-java-2.x/trunk/samples/launcher-embedded-jse/src/main/java/launcher/SampleJSELauncher.java b/sca-java-2.x/trunk/samples/launcher-embedded-jse/src/main/java/launcher/SampleJSELauncher.java
index a4f9247503..021b4d9a17 100644
--- a/sca-java-2.x/trunk/samples/launcher-embedded-jse/src/main/java/launcher/SampleJSELauncher.java
+++ b/sca-java-2.x/trunk/samples/launcher-embedded-jse/src/main/java/launcher/SampleJSELauncher.java
@@ -49,7 +49,9 @@ public class SampleJSELauncher extends RuntimeIntegration {
} else if (contribution.equals("contribution-binding-ws-calculator")){
launcher.launchBindingWSCalculator();
} else if (contribution.equals("contribution-binding-rmi-calculator")){
- launcher.launchBindingRMICalculator();
+ launcher.launchBindingRMICalculator();
+ } else if (contribution.equals("contribution-implementation-java-calculator")){
+ launcher.launchImplementationJavaCalculator();
} else {
System.out.println("Sample contribution " + contribution + "not found");
}
@@ -106,6 +108,16 @@ public class SampleJSELauncher extends RuntimeIntegration {
stopNode(node2);
stopNode(node1);
- }
+ }
+
+ /**
+ * The contribution-binding-sca-calculator contribution includes a client component
+ * that calls the CalculatorServiceComponent from an operation marked by @Init.
+ */
+ public void launchImplementationJavaCalculator(){
+ Node node = startNode(new Contribution("c1", "../contribution-implementation-java-calculator/target/classes"));
+
+ stopNode(node);
+ }
}
diff --git a/sca-java-2.x/trunk/samples/launcher-embedded-jse/src/test/java/launcher/LauncherTestCase.java b/sca-java-2.x/trunk/samples/launcher-embedded-jse/src/test/java/launcher/LauncherTestCase.java
index 6154f9fce3..3c2acbcc46 100644
--- a/sca-java-2.x/trunk/samples/launcher-embedded-jse/src/test/java/launcher/LauncherTestCase.java
+++ b/sca-java-2.x/trunk/samples/launcher-embedded-jse/src/test/java/launcher/LauncherTestCase.java
@@ -26,12 +26,22 @@ import org.junit.Test;
public class LauncherTestCase {
@Test
- public void testCOntributionBindingSCACalculator() throws Exception {
+ public void testContributionBindingSCACalculator() throws Exception {
SampleJSELauncher.main(new String[] {"contribution-binding-sca-calculator"});
}
@Test
- public void testCOntributionBindingWSCalculator() throws Exception {
+ public void testContributionBindingWSCalculator() throws Exception {
SampleJSELauncher.main(new String[] {"contribution-binding-ws-calculator"});
- }
+ }
+
+ @Test
+ public void testContributionBindingRMICalculator() throws Exception {
+ SampleJSELauncher.main(new String[] {"contribution-binding-rmi-calculator"});
+ }
+
+ @Test
+ public void testContributionImplementationJavaCalculator() throws Exception {
+ SampleJSELauncher.main(new String[] {"contribution-implementation-java-calculator"});
+ }
}
diff --git a/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/calculator/CalculatorService.java b/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/calculator/CalculatorService.java
index ad87375529..12d80ffd1c 100644
--- a/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/calculator/CalculatorService.java
+++ b/sca-java-2.x/trunk/samples/launcher-embedded-osgi/src/main/java/calculator/CalculatorService.java
@@ -18,10 +18,13 @@
*/
package calculator;
+import org.oasisopen.sca.annotation.Remotable;
+
/**
* The Calculator service interface.
*/
+@Remotable
public interface CalculatorService {
double add(double n1, double n2);