Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java')
-rw-r--r--bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java15
1 files changed, 14 insertions, 1 deletions
diff --git a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
index 48054b3c0..7f4248752 100644
--- a/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
+++ b/bundles/org.eclipse.osgi/container/src/org/eclipse/osgi/storage/Storage.java
@@ -70,10 +70,11 @@ public class Storage {
private final Object saveMonitor = new Object();
private long lastSavedTimestamp = -1;
private final LockSet<Long> idLocks = new LockSet<Long>(false);
- private final MRUBundleFileList mruList = new MRUBundleFileList();
+ private final MRUBundleFileList mruList;
private final FrameworkExtensionInstaller extensionInstaller;
public Storage(EquinoxContainer container) throws IOException, BundleException {
+ mruList = new MRUBundleFileList(getBundleFileLimit(container.getConfiguration()));
equinoxContainer = container;
extensionInstaller = new FrameworkExtensionInstaller(container.getConfiguration());
@@ -137,6 +138,18 @@ public class Storage {
this.moduleContainer.setInitialModuleStates();
}
+ private int getBundleFileLimit(EquinoxConfiguration configuration) {
+ int propValue = 100; // enable to 100 open files by default
+ try {
+ String prop = configuration.getConfiguration(EquinoxConfiguration.PROP_FILE_LIMIT);
+ if (prop != null)
+ propValue = Integer.parseInt(prop);
+ } catch (NumberFormatException e) {
+ // use default of 100
+ }
+ return propValue;
+ }
+
private void installExtensions() {
Module systemModule = moduleContainer.getModule(0);
ModuleRevision systemRevision = systemModule == null ? null : systemModule.getCurrentRevision();

Back to the top