Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-05-11 05:54:19 -0400
committerGlyn Normington2011-05-11 05:54:19 -0400
commit9274e509cec65ae140bbb606452cfec09b99995e (patch)
treee6d51c4c00fd6792ec38973d0ef4a7ac9ce811ac /org.eclipse.virgo.kernel.userregionfactory
parent145ff0c85ffd02a3976d442fe6a48c8ea7b616bd (diff)
downloadorg.eclipse.virgo.kernel-9274e509cec65ae140bbb606452cfec09b99995e.tar.gz
org.eclipse.virgo.kernel-9274e509cec65ae140bbb606452cfec09b99995e.tar.xz
org.eclipse.virgo.kernel-9274e509cec65ae140bbb606452cfec09b99995e.zip
bug 343364: switch to using Equinox region digraph
Diffstat (limited to 'org.eclipse.virgo.kernel.userregionfactory')
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/.classpath1
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java12
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/template.mf3
3 files changed, 10 insertions, 6 deletions
diff --git a/org.eclipse.virgo.kernel.userregionfactory/.classpath b/org.eclipse.virgo.kernel.userregionfactory/.classpath
index 3a41e0be..d3d126d8 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/.classpath
+++ b/org.eclipse.virgo.kernel.userregionfactory/.classpath
@@ -19,5 +19,6 @@
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.M04/org.eclipse.virgo.util.osgi-3.0.0.M04.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.M04/org.eclipse.virgo.util.parser.manifest-3.0.0.M04.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
<classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.M04/org.eclipse.virgo.teststubs.osgi-3.0.0.M04.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.region/1.0.0.v20110503/org.eclipse.equinox.region-1.0.0.v20110503.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
diff --git a/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java b/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
index 795a14a3..32be193a 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
+++ b/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
@@ -28,10 +28,10 @@ import java.util.concurrent.TimeoutException;
import org.eclipse.virgo.kernel.core.Shutdown;
import org.eclipse.virgo.kernel.osgi.framework.OsgiFrameworkUtils;
import org.eclipse.virgo.kernel.osgi.framework.OsgiServiceHolder;
-import org.eclipse.virgo.kernel.osgi.region.Region;
-import org.eclipse.virgo.kernel.osgi.region.RegionDigraph;
-import org.eclipse.virgo.kernel.osgi.region.RegionFilter;
-import org.eclipse.virgo.kernel.osgi.region.RegionFilterBuilder;
+import org.eclipse.equinox.region.Region;
+import org.eclipse.equinox.region.RegionDigraph;
+import org.eclipse.equinox.region.RegionFilter;
+import org.eclipse.equinox.region.RegionFilterBuilder;
import org.eclipse.virgo.medic.dump.DumpGenerator;
import org.eclipse.virgo.medic.eventlog.EventLogger;
import org.eclipse.virgo.osgi.launcher.parser.ArgumentParser;
@@ -66,6 +66,8 @@ import org.osgi.service.event.EventAdmin;
*/
public final class Activator implements BundleActivator {
+ private static final String KERNEL_REGION_NAME = "org.eclipse.equinox.region.kernel";
+
private static final String CLASS_LIST_SEPARATOR = ",";
private static final long MAX_SECONDS_WAIT_FOR_SERVICE = 30;
@@ -189,7 +191,7 @@ public final class Activator implements BundleActivator {
}
private Region getKernelRegion(RegionDigraph regionDigraph) {
- return regionDigraph.iterator().next();
+ return regionDigraph.getRegion(KERNEL_REGION_NAME);
}
private RegionFilter createKernelFilter(RegionDigraph digraph, BundleContext systemBundleContext, EventLogger eventLogger)
diff --git a/org.eclipse.virgo.kernel.userregionfactory/template.mf b/org.eclipse.virgo.kernel.userregionfactory/template.mf
index 228ea8cd..b645996e 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/template.mf
+++ b/org.eclipse.virgo.kernel.userregionfactory/template.mf
@@ -10,7 +10,8 @@ Import-Template:
org.eclipse.osgi.service.resolver.*;version="0",
org.osgi.framework.*;version="0",
org.osgi.service.*;version="0",
- org.eclipse.virgo.medic.*;version="${org.eclipse.virgo.medic:[=.=.=, =.+1)}"
+ org.eclipse.virgo.medic.*;version="${org.eclipse.virgo.medic:[=.=.=, =.+1)}",
+ org.eclipse.equinox.region.*;version="${org.eclipse.equinox.region:[=.=.=, =.+1)}"
Import-Package: org.aspectj.lang;version="0"
Bundle-Activator: org.eclipse.virgo.kernel.userregionfactory.Activator
Excluded-Imports: org.easymock,

Back to the top