Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2014-04-22 21:25:25 +0000
committerThomas Watson2014-04-22 21:25:25 +0000
commit2ff2f7cd9e87b71b566574ff14ee148141232527 (patch)
tree3bc976990cdac5d8ecf438c4e3959451bdce05cd
parentd50939980ee9c5b4fc82a2f85d70bb1fa44a707a (diff)
downloadrt.equinox.framework-2ff2f7cd9e87b71b566574ff14ee148141232527.tar.gz
rt.equinox.framework-2ff2f7cd9e87b71b566574ff14ee148141232527.tar.xz
rt.equinox.framework-2ff2f7cd9e87b71b566574ff14ee148141232527.zip
Bug 408688 - [unity] Immediate persistence results in no framework active thread.
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java
index 31a4d37ed..f3b7fc444 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/internal/framework/EquinoxContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2012, 2013 IBM Corporation and others.
+ * Copyright (c) 2012, 2014 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -39,7 +39,7 @@ import org.osgi.service.startlevel.StartLevel;
import org.osgi.util.tracker.ServiceTracker;
@SuppressWarnings("deprecation")
-public class EquinoxContainer implements ThreadFactory {
+public class EquinoxContainer implements ThreadFactory, Runnable {
public static final String NAME = "org.eclipse.osgi"; //$NON-NLS-1$
private static final String CONFIG_FILE = "config.ini"; //$NON-NLS-1$
static final SecureAction secureAction = AccessController.doPrivileged(SecureAction.createSecureAction());
@@ -208,6 +208,8 @@ public class EquinoxContainer implements ThreadFactory {
serviceRegistry = new ServiceRegistry(this);
initializeContextFinder();
executor = Executors.newScheduledThreadPool(1, this);
+ // be sure to initialize the executor threads
+ executor.execute(this);
storageSaver = new StorageSaver(this);
}
}
@@ -332,4 +334,10 @@ public class EquinoxContainer implements ThreadFactory {
t.setPriority(Thread.NORM_PRIORITY);
return t;
}
+
+ @Override
+ public void run() {
+ // Do nothing; just used to ensure the active thread is created during init
+ }
+
}

Back to the top