Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/osgi
diff options
context:
space:
mode:
authorslewis2018-02-27 17:09:42 -0500
committerslewis2018-02-27 17:09:42 -0500
commitd3ed0e687b48c5e168a40ad42354690d4c2dce8e (patch)
treeffefd699936deee2680c1a84863c28ae1f7b4066 /osgi
parent46d36fa8e7587b660764a87aacff483c0e58482b (diff)
downloadorg.eclipse.ecf-d3ed0e687b48c5e168a40ad42354690d4c2dce8e.tar.gz
org.eclipse.ecf-d3ed0e687b48c5e168a40ad42354690d4c2dce8e.tar.xz
org.eclipse.ecf-d3ed0e687b48c5e168a40ad42354690d4c2dce8e.zip
Updated RSA activator so that it starts lazy dependent bundles.
Diffstat (limited to 'osgi')
-rw-r--r--osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
index 7e7525f41..a65e40067 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
@@ -26,6 +26,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.ecf.core.ContainerFactory;
import org.eclipse.ecf.core.ContainerTypeDescription;
import org.eclipse.ecf.core.IContainerManager;
+import org.eclipse.ecf.core.util.BundleStarter;
import org.eclipse.ecf.core.util.LogHelper;
import org.eclipse.ecf.core.util.SystemLogService;
import org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription;
@@ -60,6 +61,9 @@ public class Activator implements BundleActivator {
private static BundleContext context;
private static Activator instance;
+ private static final String[] DEPENDENT_BUNDLES = new String[] { "org.eclipse.ecf.identity", "org.eclipse.ecf", //$NON-NLS-1$ //$NON-NLS-2$
+ "org.eclipse.ecf.discovery", "org.eclipse.ecf.remoteservice", "org.eclipse.ecf.remoteservice.asyncproxy" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
public static BundleContext getContext() {
return context;
}
@@ -213,6 +217,15 @@ public class Activator implements BundleActivator {
ris.toArray(new String[ris.size()]));
}
+ private void initializeDependents() {
+ try {
+ BundleStarter.startDependents(context, DEPENDENT_BUNDLES, Bundle.RESOLVED | Bundle.STARTING);
+ } catch (BundleException e) {
+ LogUtility.logError("RemoteServiceAdmin.initializeDependents", DebugOptions.REMOTE_SERVICE_ADMIN, this.getClass(), //$NON-NLS-1$
+ "Cannot start RSA dependent bundle", e); //$NON-NLS-1$
+ }
+ }
+
/*
* (non-Javadoc)
*
@@ -225,6 +238,8 @@ public class Activator implements BundleActivator {
Activator.instance = this;
this.exportedRegistrations = new ArrayList<ExportRegistration>();
this.importedRegistrations = new ArrayList<ImportRegistration>();
+ // start dependent bundles first
+ initializeDependents();
// initialize the RSA proxy service factory bundle...so that we
// can get/use *that bundle's BundleContext for registering the
// proxy ServiceFactory.

Back to the top