From b029a4016074bd535a0f2aa5277bdb03bad06921 Mon Sep 17 00:00:00 2001 From: rfeng Date: Fri, 31 Jul 2009 18:08:22 +0000 Subject: Use the extensibility-equinox module to dynamically imports public packages and resources git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@799679 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java | 2 +- .../org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'java/sca/modules/node-launcher-equinox/src') diff --git a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java index 24a8b368dc..b8b6c39354 100644 --- a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java +++ b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/EquinoxHost.java @@ -355,7 +355,7 @@ public class EquinoxHost { private boolean isServiceProvider(Bundle bundle, Set serviceProviders) { if (bundle != null) { String export = (String)bundle.getHeaders().get(Constants.EXPORT_PACKAGE); - if (export != null && export.contains("META-INF.services")) { + if (export != null && export.contains(NodeLauncherUtil.META_INF_SERVICES)) { serviceProviders.add(bundle.getSymbolicName()); return true; } diff --git a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java index c059811e3b..832427b380 100644 --- a/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java +++ b/java/sca/modules/node-launcher-equinox/src/main/java/org/apache/tuscany/sca/node/equinox/launcher/NodeLauncherUtil.java @@ -89,6 +89,7 @@ final class NodeLauncherUtil { private static final Logger logger = Logger.getLogger(NodeLauncherUtil.class.getName()); + static final String META_INF_SERVICES = "META-INF.services;partial=true;mandatory:=partial"; static final String LAUNCHER_EQUINOX_LIBRARIES = "org.apache.tuscany.sca.node.launcher.equinox.libraries"; static final String GATEWAY_BUNDLE = "org.apache.tuscany.sca.gateway"; @@ -347,7 +348,7 @@ final class NodeLauncherUtil { pkg = pkg.replace('/', '.') + version; // Export META-INF.services if ("META-INF.services".equals(pkg)) { - packages.add("META-INF.services" + ";partial=true;mandatory:=partial"); + packages.add(META_INF_SERVICES); } else { packages.add(pkg); } -- cgit v1.2.3