From 61bbda32a81cab934bca838321dc8238cf494aa8 Mon Sep 17 00:00:00 2001
From: slewis
Date: Mon, 14 May 2018 20:46:44 -0700
Subject: Fix for bndtools startup limitation.
Change-Id: Ic6244118ec4489eb645f965b429f4dd6c6dff6e9
---
.../META-INF/MANIFEST.MF | 2 +-
.../bundles/org.eclipse.ecf.provider.r_osgi/pom.xml | 2 +-
.../ecf/internal/provider/r_osgi/Activator.java | 18 ++++++------------
3 files changed, 8 insertions(+), 14 deletions(-)
(limited to 'providers/bundles')
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 21adbe54a..49eb41df9 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
@@ -3,7 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.provider.r_osgi;singleton:=true
Automatic-Module-Name: org.eclipse.ecf.provider.r_osgi
-Bundle-Version: 3.6.0.qualifier
+Bundle-Version: 3.6.100.qualifier
Import-Package: ch.ethz.iks.r_osgi;version="[1.0.1,2.0.0)",
org.eclipse.ecf.core.util.reflection,
org.eclipse.ecf.remoteservice.asyncproxy;version="[1.0.0,3.0.0)",
diff --git a/providers/bundles/org.eclipse.ecf.provider.r_osgi/pom.xml b/providers/bundles/org.eclipse.ecf.provider.r_osgi/pom.xml
index d5eb985cf..e670e4421 100644
--- a/providers/bundles/org.eclipse.ecf.provider.r_osgi/pom.xml
+++ b/providers/bundles/org.eclipse.ecf.provider.r_osgi/pom.xml
@@ -10,6 +10,6 @@
org.eclipse.ecf
org.eclipse.ecf.provider.r_osgi
- 3.6.0-SNAPSHOT
+ 3.6.100-SNAPSHOT
eclipse-plugin
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 fd337c55a..329cb211c 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
@@ -15,6 +15,7 @@ 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.BundleStarter;
import org.eclipse.ecf.core.util.ExtensionRegistryRunnable;
import org.eclipse.ecf.provider.r_osgi.identity.*;
import org.eclipse.equinox.concurrent.future.IExecutor;
@@ -54,13 +55,6 @@ public final class Activator implements BundleActivator {
// The service tracker for the R-OSGi remote service
private ServiceTracker r_osgi_tracker;
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
/**
* Called when the OSGi framework starts the bundle.
*
@@ -69,10 +63,13 @@ public final class Activator implements BundleActivator {
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(final BundleContext bc) throws Exception {
+ plugin = this;
this.context = bc;
+ // start ch.ethz.iks.r_osgi.remote bundle
+ BundleStarter.startDependents(context, new String[] {"ch.ethz.iks.r_osgi.remote"}, Bundle.RESOLVED | Bundle.STARTING); //$NON-NLS-1$
+
r_osgi_tracker = new ServiceTracker(context, RemoteOSGiService.class.getName(), null);
r_osgi_tracker.open();
-
// bug 495535
if (DELETE_PROXY_BUNDLES_ON_INIT)
deleteProxyBundles();
@@ -150,10 +147,7 @@ public final class Activator implements BundleActivator {
*
* @return the shared instance
*/
- public static synchronized Activator getDefault() {
- if (plugin == null) {
- plugin = new Activator();
- }
+ public static Activator getDefault() {
return plugin;
}
--
cgit v1.2.3