Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-03-30 01:36:49 +0000
committerslewis2014-03-30 01:36:49 +0000
commit9b1e192c7ef5ebf007b403d843bd2f71b4a6d7b4 (patch)
tree847cb310c582d92cb00eb79fb838e8ddeea06c01 /providers
parentc2c021a2c39100409ec8322172f87657487750e0 (diff)
downloadorg.eclipse.ecf-9b1e192c7ef5ebf007b403d843bd2f71b4a6d7b4.tar.gz
org.eclipse.ecf-9b1e192c7ef5ebf007b403d843bd2f71b4a6d7b4.tar.xz
org.eclipse.ecf-9b1e192c7ef5ebf007b403d843bd2f71b4a6d7b4.zip
Updates to support r_osgi provider working without equinox extension
registry as per bug 421569 Change-Id: If6102913c94f46279ee56abd028a670aff7a1f51
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/Activator.java13
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java1
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiRemoteServiceNamespace.java4
4 files changed, 19 insertions, 1 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
index 2b40780f9..b0a7c8973 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.provider.r_osgi;singleton:=true
-Bundle-Version: 3.3.0.qualifier
+Bundle-Version: 3.4.0.qualifier
Import-Package: org.eclipse.ecf.core.util.reflection,
org.eclipse.equinox.concurrent.future;version="1.0.0",
org.osgi.framework;version="1.3.0",
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/Activator.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/Activator.java
index e5d33c2bb..216b2fcad 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/Activator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/Activator.java
@@ -12,6 +12,12 @@
package org.eclipse.ecf.internal.provider.r_osgi;
import ch.ethz.iks.r_osgi.RemoteOSGiService;
+import org.eclipse.core.runtime.SafeRunner;
+import org.eclipse.ecf.core.ContainerTypeDescription;
+import org.eclipse.ecf.core.identity.Namespace;
+import org.eclipse.ecf.core.util.ExtensionRegistryRunnable;
+import org.eclipse.ecf.provider.r_osgi.identity.R_OSGiNamespace;
+import org.eclipse.ecf.provider.r_osgi.identity.R_OSGiRemoteServiceNamespace;
import org.eclipse.equinox.concurrent.future.IExecutor;
import org.osgi.framework.*;
import org.osgi.util.tracker.ServiceTracker;
@@ -64,6 +70,13 @@ public final class Activator implements BundleActivator {
this.context = bc;
r_osgi_tracker = new ServiceTracker(context, RemoteOSGiService.class.getName(), null);
r_osgi_tracker.open();
+ SafeRunner.run(new ExtensionRegistryRunnable(bc) {
+ protected void runWithoutRegistry() throws Exception {
+ bc.registerService(Namespace.class, new R_OSGiNamespace(), null);
+ bc.registerService(Namespace.class, new R_OSGiRemoteServiceNamespace(), null);
+ bc.registerService(ContainerTypeDescription.class, new ContainerTypeDescription(R_OSGiContainerInstantiator.NAME, new R_OSGiContainerInstantiator(), "R_OSGi Container", true, false), null); //$NON-NLS-1$
+ }
+ });
}
/**
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
index db3bd9eaa..4e88fd40f 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/internal/provider/r_osgi/R_OSGiContainerInstantiator.java
@@ -104,6 +104,7 @@ public final class R_OSGiContainerInstantiator implements IContainerInstantiator
}
private static final String ROSGI_CONFIG = "ecf.r_osgi.peer"; //$NON-NLS-1$
+ public static final String NAME = ROSGI_CONFIG;
private static final String[] ROSGI_CONFIGS = new String[] {ROSGI_CONFIG};
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiRemoteServiceNamespace.java b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiRemoteServiceNamespace.java
index ac1ff8569..db8983bec 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiRemoteServiceNamespace.java
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/src/org/eclipse/ecf/provider/r_osgi/identity/R_OSGiRemoteServiceNamespace.java
@@ -23,6 +23,10 @@ public class R_OSGiRemoteServiceNamespace extends Namespace {
public static final String NAME = "ecf.namespace.r_osgi.remoteservice"; //$NON-NLS-1$
+ public R_OSGiRemoteServiceNamespace() {
+ super(NAME, "R_OSGi Remote Service Namespace"); //$NON-NLS-1$
+ }
+
public ID createInstance(Object[] parameters) throws IDCreateException {
if (parameters == null || parameters.length != 2)
throw new IDCreateException("Parameters incorrect for remote ID creation"); //$NON-NLS-1$

Back to the top