diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-04-07 21:08:52 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-04-07 21:08:52 +0000 |
commit | 3ef97e3558b10b558afaaac3942b60993faa7441 (patch) | |
tree | c721de38f9cc42df137e829e74fbc3b9a46ae436 /java/sca/samples/dosgi-calculator-operations | |
parent | 5e55cb31f442091bdcaeebf59146f43d0e2f017e (diff) |
Expose the CalculatorService as a web service
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@762966 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/samples/dosgi-calculator-operations')
-rw-r--r-- | java/sca/samples/dosgi-calculator-operations/pom.xml | 2 | ||||
-rw-r--r-- | java/sca/samples/dosgi-calculator-operations/src/test/java/calculator/dosgi/operations/test/CalculatorOSGiNodeTestCase.java | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/java/sca/samples/dosgi-calculator-operations/pom.xml b/java/sca/samples/dosgi-calculator-operations/pom.xml index 945b9bbb6d..fd08e25e72 100644 --- a/java/sca/samples/dosgi-calculator-operations/pom.xml +++ b/java/sca/samples/dosgi-calculator-operations/pom.xml @@ -48,7 +48,7 @@ <groupId>org.apache.tuscany.sca</groupId>
<artifactId>tuscany-node-impl-osgi</artifactId>
<version>2.0-SNAPSHOT</version>
- <scope>test</scope>
+ <scope>runtime</scope>
</dependency>
<dependency>
diff --git a/java/sca/samples/dosgi-calculator-operations/src/test/java/calculator/dosgi/operations/test/CalculatorOSGiNodeTestCase.java b/java/sca/samples/dosgi-calculator-operations/src/test/java/calculator/dosgi/operations/test/CalculatorOSGiNodeTestCase.java index cedba02b47..fbda1990fa 100644 --- a/java/sca/samples/dosgi-calculator-operations/src/test/java/calculator/dosgi/operations/test/CalculatorOSGiNodeTestCase.java +++ b/java/sca/samples/dosgi-calculator-operations/src/test/java/calculator/dosgi/operations/test/CalculatorOSGiNodeTestCase.java @@ -34,6 +34,7 @@ import org.junit.BeforeClass; import org.junit.Test;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
import calculator.dosgi.operations.AddService;
@@ -66,9 +67,11 @@ public class CalculatorOSGiNodeTestCase { if (b.getSymbolicName().equals("org.eclipse.equinox.ds") || b.getSymbolicName()
.startsWith("org.apache.tuscany.sca.")) {
try {
- b.start();
+ if (b.getHeaders().get(Constants.FRAGMENT_HOST) == null) {
+ // Start the non-fragment bundle
+ b.start();
+ }
} catch (Exception e) {
- System.out.println(bundleStatus(b, false));
e.printStackTrace();
}
System.out.println(bundleStatus(b, false));
|