Hi,
While trying the Felix as the OSGI runtime, I have some questions about
the resolve policy, please help to give some comments, thanks !
1. Can an import connection be wired to an installed (not resolved)
bundle ? I found there is description in the spec 3.7, which says "A
resolved exporter must be preferred over an unresolved exporter.". So does
it mean that the answer is yes ?
2. I have a bunlde A and bundle B, bundle A needs to import some packages
from bundle B. But my installation order is that first A, then B. From the
log messages, I could see after installing A, FelixDispatchQueue said that
bunldle A is in the installed state. Then I install B, the messages showed
that " Bundle B resolved, Bundle A resloved". I wonder when the resolve
action will occured ? Will Felix check whether all the installed bundle
could be resolved once a new bundle is installed or resolved ?
3. Related to question 2, if I have ten bundles and I am sure that each
bundle could find export packages from other nine bundles. But I do not
install them according to their dependency relations. Then, will the logic
below work correctly ? In my tests, it seems that they could work correctly.
String[] locations = {......};
Bundle[] bundles = new Bundles[locations.length];
for(int i=0;i<locations.length;i++) {
bundles[i] = bundleContext.installBundle(locations[i]);
}
for(Bundle b : bundles) {
b.start();
}
Ivan