Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2010-12-20 22:49:33 -0500
committerGlyn Normington2010-12-20 22:49:33 -0500
commitae529bd7c22b4724e2b9dc64ec47003a6f5722b8 (patch)
treedfe4875f616f9103a672ae721374b8ff5940e96f
parent5d69c6dc9a4cfb294d6ebccec431402797ca6dad (diff)
downloadorg.eclipse.virgo.kernel-ae529bd7c22b4724e2b9dc64ec47003a6f5722b8.tar.gz
org.eclipse.virgo.kernel-ae529bd7c22b4724e2b9dc64ec47003a6f5722b8.tar.xz
org.eclipse.virgo.kernel-ae529bd7c22b4724e2b9dc64ec47003a6f5722b8.zip
bug 330776: fixes
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties1
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceFindHook.java10
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceHookBase.java2
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties1
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java3
6 files changed, 12 insertions, 7 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF b/org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF
index c49e7c13..7353e09c 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF
+++ b/org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF
@@ -1,6 +1,4 @@
Manifest-Version: 1.0
-Bundle-ClassPath: .,org.springframework.beans-2.5.6.A.jar,org.springfr
- amework.core-2.5.6.A.jar
Bundle-Version: 2.2.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-Name: Virgo Kernel Deployer Test
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
index 1c501c97..9b0f9ef3 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
@@ -47,6 +47,7 @@ packageImports =\
org.slf4j;version="[1.6.1,2)"
serviceImports =\
+ org.eclipse.virgo.kernel.osgi.region.Region,\
org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer,\
org.eclipse.virgo.kernel.deployer.core.DeployUriNormaliser,\
org.eclipse.virgo.kernel.install.artifact.ScopeServiceRepository,\
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceFindHook.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceFindHook.java
index e4d7d514..a7674095 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceFindHook.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceFindHook.java
@@ -54,15 +54,18 @@ final class RegionServiceFindHook extends RegionServiceHookBase implements FindH
@Override
public void find(BundleContext bundleContext, String name, String filter, boolean allServices, Collection<ServiceReference<?>> references) {
if (!isSystemBundle(bundleContext)) {
- if (bundleContext.getBundle().getSymbolicName().startsWith("org.springframework.osgi") && name != null && name.contains("PackageAdminUtil") ) {
+ if (bundleContext.getBundle().getSymbolicName().startsWith("org.springframework.osgi") && name != null
+ && name.contains("PackageAdminUtil")) {
System.out.println("DEBUG 3");
}
if (isUserRegionBundle(bundleContext)) {
Iterator<ServiceReference<?>> i = references.iterator();
while (i.hasNext()) {
ServiceReference<?> serviceReference = i.next();
- // Prevent kernel region services which are not imported from being found by user region bundles.
+ // Prevent kernel region services which are not imported
+ // from being found by user region bundles.
if (!isUserRegionService(serviceReference) && !serviceImported(serviceReference) && !isSystemBundleService(serviceReference)) {
+ System.out.println("RSFH removing " + serviceReference);
i.remove();
}
}
@@ -70,7 +73,8 @@ final class RegionServiceFindHook extends RegionServiceHookBase implements FindH
Iterator<ServiceReference<?>> i = references.iterator();
while (i.hasNext()) {
ServiceReference<?> serviceReference = i.next();
- // Prevent user region services which are not exported from being found by kernel region bundles.
+ // Prevent user region services which are not exported from
+ // being found by kernel region bundles.
if (isUserRegionService(serviceReference) && !serviceExported(serviceReference) && !isSystemBundleService(serviceReference)) {
i.remove();
}
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceHookBase.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceHookBase.java
index e30d14f7..ccff8171 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceHookBase.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/RegionServiceHookBase.java
@@ -37,7 +37,7 @@ abstract class RegionServiceHookBase {
private static final String SERVICE_CLASS_NAME_PROPERTY = "objectClass";
- private static final String SERVICE_CLASS_SEPARATOR = "'";
+ private static final String SERVICE_CLASS_SEPARATOR = ",";
private final RegionMembership regionMembership;
diff --git a/org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties b/org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
index 88c42389..7ed8240f 100644
--- a/org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
+++ b/org.eclipse.virgo.kernel.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
@@ -43,6 +43,7 @@ packageImports =\
org.slf4j.spi;version="[1.6.1,2)"
serviceImports =\
+ org.eclipse.virgo.kernel.osgi.region.Region,\
org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer,\
org.eclipse.virgo.kernel.deployer.core.DeployUriNormaliser,\
org.eclipse.virgo.kernel.install.artifact.ScopeServiceRepository,\
diff --git a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java
index dadecb47..012ff737 100644
--- a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java
+++ b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java
@@ -43,6 +43,7 @@ import org.eclipse.virgo.kernel.userregion.internal.quasi.StandardQuasiFramework
import org.eclipse.virgo.kernel.userregion.internal.quasi.StandardResolutionFailureDetective;
import org.eclipse.virgo.medic.dump.DumpContributor;
import org.eclipse.virgo.medic.eventlog.EventLogger;
+import org.eclipse.virgo.medic.eventlog.EventLoggerFactory;
import org.eclipse.virgo.osgi.extensions.equinox.hooks.MetaInfResourceClassLoaderDelegateHook;
import org.eclipse.virgo.repository.Repository;
import org.eclipse.virgo.util.osgi.ServiceRegistrationTracker;
@@ -91,7 +92,7 @@ public class Activator implements BundleActivator {
Repository repository = OsgiFrameworkUtils.getService(context, Repository.class).getService();
PackageAdmin packageAdmin = OsgiFrameworkUtils.getService(context, PackageAdmin.class).getService();
- EventLogger eventLogger = OsgiFrameworkUtils.getService(context, EventLogger.class).getService();
+ EventLogger eventLogger = OsgiFrameworkUtils.getService(context, EventLoggerFactory.class).getService().createEventLogger(context.getBundle());
ImportExpansionHandler importExpansionHandler = createImportExpansionHandler(context, packageAdmin, repository, eventLogger);
this.registrationTracker.track(context.registerService(ImportExpander.class.getName(), importExpansionHandler, null));

Back to the top