diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-25 04:53:56 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-25 04:53:56 +0000 |
commit | 2aa39a40c33cb185382ebfedea10ef0e444e79fc (patch) | |
tree | 5058e64091f67a9ff4da6506d7ba1777052b2d5b /branches/sca-equinox/samples/calculator-equinox | |
parent | 3913958f543845da0d74beb09b502a1e8712faf2 (diff) |
Rationalized how to locate an SCA contribution given a known Java class contained in that contribution, and how to locate an SCA contribution represented by an OSGi bundle.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@698815 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/samples/calculator-equinox')
-rw-r--r-- | branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java b/branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java index dc0da7d20d..706293f262 100644 --- a/branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java +++ b/branches/sca-equinox/samples/calculator-equinox/src/test/java/calculator/CalculatorTestCase.java @@ -21,6 +21,8 @@ package calculator; import junit.framework.TestCase; import org.apache.tuscany.sca.node.SCANode; +import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +import org.apache.tuscany.sca.node.equinox.launcher.ContributionLocationHelper; import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; import org.osoa.sca.annotations.EagerInit; import org.osoa.sca.annotations.Scope; @@ -38,7 +40,8 @@ public class CalculatorTestCase extends TestCase { @Override protected void setUp() throws Exception { launcher = NodeLauncher.newInstance(); - node = launcher.createNodeFromClassLoader("Calculator.composite", getClass().getClassLoader()); + String location = ContributionLocationHelper.getContributionLocation(getClass()); + node = launcher.createNode("Calculator.composite", new Contribution("test", location)); System.out.println("SCA Node API ClassLoader: " + node.getClass().getClassLoader()); node.start(); } |