While working on the JSF OSGi bundle integration, I've noticed
a small problem with how the jsf-connector module interacts
The current version of the jsf-connector has the jsf implementation
classes inlined. This allows the TLD provider to call ModulesRegistry(Class)
passing in the TLD provider class itself to locate the Module to get the TLD
However, once the jsf implementation classes are no longer inlined, the
code falls apart (the TLDs are in a separate module now). I've resolved
the issue by calling ModulesRegistry.getModules() and searching the
Collection for the module that needs to be scanned using the osgi symbolic
bundle name - probably not the best choice as we don't want any hard dependencies
on bundle names.
I've looked at the ModulesRegistry API and haven't found anything else that
we might be able to leverage. So I thought I would throw out an idea.
Since OSGi bundles typically have a list of packages they export, it seems a
module could potentially be found using a package name as well. Something
Module ModulesRegistry.find(String packageName)