Interesting... How would you start approaching this problem?...

-Kyrill

BJ Hargrave wrote:
OSGi does not require class loaders to be backed by jar files. Jars are the typically distribution (and install) format for bundles. But once installed, the framework is free to manage the bundle contents in anyway (e.g. put them in a database.) OSGi also does not require bundles to be in jar format. Many OSGi implementations support installing bundles in directory format or even VM implementation proprietary formats (e.g. J9 JXE).

So I don't see that there is any way to map a bundle's classloader onto a set of jar files for that bundle.

A better problem to look at for OSGi, would be what bundles are installed but not used. This could be determined by analyzing that state of the installed bundles (are they started? will they be started at some startlevel?) and the dependencies between bundles (does some other bundle depend upon this bundle?). This analysis could find "orhpan" bundles which can safely be uninstalled.

My main point is that in OSGi you should not think in terms of jars (and classloaders which reference them) but in terms of bundles (and which bundles reference them).

_______________________________________________
OSGi Developer Mail List
[email protected]
https://www2.osgi.org/mailman/listinfo/osgi-dev

Reply via email to