Community
Participate
Working Groups
The OSGi framework currently needs to be able to open concurrently all of the bundles installed. This can be an issue on some device platforms where the number of open files can be limited. My suggestion would be to add the capability to specify how many files handles the OSGi framework can concurrently hold open. The framework code would manage opening and closing of bundles in accordance with this paramater - probably closing the least recently referenced bundle when it needed to open an additional bundle that would exceed the open file limit specified.
Cool! Is this related to the idea of timing out jars (bug 84066)? Rather than timeout this is some sort of MRU cache. interesting.
Yes, Bill discussed this idea with me and I thought is sounded promising. It is trying to solve the same problem as bug 84066. I think it has better behavior because timeouts have issues when resources are limited, the timeout may not cause the files to be closed before you run out of file handles (for example, while installing many bundles at the same time). This solution should also not require an extra thread to monitor the timeouts. I think we should investigate.
I have released a possible implementation of an MRU cache for open ZipBundleFiles into the new EquinoxAdaptor being developed in the equinox- incubator see 114968. A limit on the number of zip files opened can be set by specifying the property equinox.bundlefile.limit
The new adaptor has been released to HEAD for 3.2 M5. A new property has been added to limit the number of jar files the framework will keep open: osgi.bundlefile.limit