diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-19 05:31:14 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-09-19 05:31:14 +0000 |
commit | 6a633dee838417ed68cf91fbd2e9b3b9fa07bd8f (patch) | |
tree | 658d78b2087d2f851518be4d27ed9d913ac47ebb /branches/sca-equinox/samples/calculator-rcp/src | |
parent | bd126f649a92dd53cd3b3ccef5029ab273436291 (diff) |
Simplified ServiceDiscoverer. Started to use it to create factories to resolve ClassNotFoundExceptions. Renamed calculator-osgi to calculator-equinox and a few fixes to get it working in Eclipse.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@696924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/samples/calculator-rcp/src')
-rw-r--r-- | branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java index 50f68dcb01..2b1bae34de 100644 --- a/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java +++ b/branches/sca-equinox/samples/calculator-rcp/src/main/java/calculator/rcp/Activator.java @@ -21,9 +21,9 @@ package calculator.rcp; import java.io.File; import org.apache.tuscany.sca.extensibility.equinox.EquinoxServiceDiscoverer; -import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; -import org.apache.tuscany.sca.node.SCANodeFactory; +import org.apache.tuscany.sca.node.equinox.launcher.Contribution; +import org.apache.tuscany.sca.node.equinox.launcher.NodeLauncher; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.plugin.AbstractUIPlugin; import org.osgi.framework.BundleContext; @@ -39,6 +39,7 @@ public class Activator extends AbstractUIPlugin { // The shared instance private static Activator plugin; + private NodeLauncher launcher; private SCANode node; /** @@ -54,9 +55,8 @@ public class Activator extends AbstractUIPlugin { public void start(BundleContext context) throws Exception { super.start(context); plugin = this; - Class<?> cls = EquinoxServiceDiscoverer.class; - SCANodeFactory factory = SCANodeFactory.newInstance(); - node = factory.createSCANode("Calculator.composite", new SCAContribution("c1", new File("target/classes").toURI().toString())); + launcher = NodeLauncher.newInstance(); + node = launcher.createNode("Calculator.composite", new Contribution("c1", new File("target/classes").toURI().toString())); node.start(); } @@ -70,6 +70,9 @@ public class Activator extends AbstractUIPlugin { if (node != null) { node.stop(); } + if (launcher != null) { + launcher.destroy(); + } } /** |