MyFaces Core
  1. MyFaces Core
  2. MYFACES-3051

Use multiple ClassLoaders to find resources (not only ContextClassLoader)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      OSGi

      Description

      In most parts of the code we only use the ContextClassLoader to find Classes and Resources. However, in some parts we also use the ClassLoader of the current Class or of a specific Class (e.g. to use myfaces-api and/or myfaces-impl ClassLoader, see ApplicationImpl.getResourceBundle(), BeanValidator.postSetValidationGroups(), ResourceHandlerImpl.getBundle() or FactoryFinder for example).

      IMO we should unify this code and maybe provide a custom ClassLoader that encapsulates three ClassLoaders (ContextClassLoader, myfaces-api and myfaces-impl). This most certainly would solve a lot of OSGi related problems.

      WDYT?

      1. MYFACES-3051-first-draft.patch
        8 kB
        Jakob Korherr
      2. MYFACES-3051-impl-and-shared.patch
        36 kB
        Jakob Korherr
      3. MYFACES-3051-impl-and-shared-2.patch
        41 kB
        Jakob Korherr

        Issue Links

          Activity

            People

            • Assignee:
              Jakob Korherr
              Reporter:
              Jakob Korherr
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development