summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-01-28 00:11:14 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-01-28 00:11:14 +0000
commit61bb7f0a33cb302174753e490418141d13fe9359 (patch)
tree8cc09071438db5348fb82632738c6e4f386c7996
parentb2e057a087c08054ea301e3aee3c4c84afe85439 (diff)
Make it aware of bundle fragments
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@738314 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--java/sca/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/sca/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java b/java/sca/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java
index 97c878efde..7fba6a003e 100644
--- a/java/sca/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java
+++ b/java/sca/modules/extensibility-equinox/src/main/java/org/apache/tuscany/sca/extensibility/equinox/EquinoxServiceDiscoverer.java
@@ -42,6 +42,7 @@ import org.apache.tuscany.sca.extensibility.ServiceDiscoverer;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
/**
* A ServiceDiscoverer that find META-INF/services/... in installed bundles
@@ -200,8 +201,9 @@ public class EquinoxServiceDiscoverer implements ServiceDiscoverer {
serviceName = "META-INF/services/" + serviceName;
for (Bundle bundle : context.getBundles()) {
- if (bundle.getBundleId() == 0) {
+ if (bundle.getBundleId() == 0 || bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null) {
// Skip system bundle as it has access to the application classloader
+ // Skip bundle fragments too
continue;
}
Enumeration<URL> urls = null;