hk2
  1. hk2
  2. HK2-3

ModulesRegistry find module by package

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.*
    • Fix Version/s: 1.*
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      3

      Description

      While working on the JSF OSGi bundle integration, I've noticed
      a small problem with how the jsf-connector module interacts
      with HK2.

      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
      locations.

      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
      like:

      Module ModulesRegistry.find(String packageName)

        Activity

        Hide
        mtaube added a comment -

        Spoke with filer, no longer needs this feature

        Show
        mtaube added a comment - Spoke with filer, no longer needs this feature

          People

          • Assignee:
            mtaube
            Reporter:
            Ryan Lubke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: