aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2011-03-07 17:36:40 (EST)
committerGlyn Normington2011-03-07 17:36:40 (EST)
commitcc8f0be91abdd910f3acf0c6eec4c88fbcbb7149 (patch)
tree4207a0caa3e59041afb057cefd417eeae1ede53d
parentd205e10a1bff8922ba9ab389aeb89bf27fb7e02c (diff)
downloadorg.eclipse.virgo.kernel-cc8f0be91abdd910f3acf0c6eec4c88fbcbb7149.zip
org.eclipse.virgo.kernel-cc8f0be91abdd910f3acf0c6eec4c88fbcbb7149.tar.gz
org.eclipse.virgo.kernel-cc8f0be91abdd910f3acf0c6eec4c88fbcbb7149.tar.bz2
Fix for sharing whole bundles.
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionFilter.java4
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionResolverHook.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionFilter.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionFilter.java
index 5449c0d..e5418a8 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionFilter.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionFilter.java
@@ -101,7 +101,7 @@ public class RegionFilter {
HashMap<String, Object> attrs = new HashMap<String, Object>(3);
String bsn = bundle.getSymbolicName();
if (bsn != null)
- attrs.put(org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, bsn);
+ attrs.put(VISIBLE_BUNDLE_NAMESPACE, bsn);
attrs.put(org.osgi.framework.Constants.BUNDLE_VERSION_ATTRIBUTE, bundle.getVersion());
return isBundleAllowed(attrs);
}
@@ -116,7 +116,7 @@ public class RegionFilter {
HashMap<String, Object> attrs = new HashMap<String, Object>(3);
String bsn = bundle.getSymbolicName();
if (bsn != null)
- attrs.put(org.osgi.framework.Constants.BUNDLE_SYMBOLICNAME_ATTRIBUTE, bsn);
+ attrs.put(VISIBLE_BUNDLE_NAMESPACE, bsn);
attrs.put(org.osgi.framework.Constants.BUNDLE_VERSION_ATTRIBUTE, bundle.getVersion());
return isBundleAllowed(attrs);
}
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionResolverHook.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionResolverHook.java
index 47d884a..897acbc 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionResolverHook.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionResolverHook.java
@@ -139,7 +139,7 @@ final class RegionResolverHook implements ResolverHook {
Iterator<BundleCapability> i = capabilities.iterator();
while (i.hasNext()) {
BundleCapability c = i.next();
- if (!filter.isCapabilityAllowed(c))
+ if (!filter.isCapabilityAllowed(c) && !filter.isBundleAllowed(c.getRevision()))
i.remove();
}
}