Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-5802

UIMA Class Loader to incorporate Thread context class loader

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.10.2SDK, 3.0.0SDK
    • 3.0.1SDK, 2.10.3SDK
    • Core Java Framework
    • None

    Description

      A long-outstanding request from uimaFIT is to incorporate the Thread's context class loader in the uima class loader's lookup scheme. see UIMA-5054

      Doing this would allow uimaFIT to no longer create individual class loaders for each AnalysisEngine its factory produces.  This would alleviate UIMA-5801.

      Current logic:

      1. see if already loaded by this loader, if so return with that
      2. try loading it, if succeed, return with that
      3. delegate to the parent.

      Fix logic: same except for a step between 2 and 3:

            2a. delegate to the Thread context class loader (if available), if succeed, return with that

      Besides doing this for loading classes, it would also be done for getting resources.

      Does anyone see any issues with this approach?

      It seems this is unneeded; if the thread context class loader is wanted in the chain, it should be the parent.  The suggested approach seems to address a non-issue where 2 parent chains are wanted.

      There are other approaches to prevent multiple class loaders ( and even maybe, multiple ResourceManagers) from being created, which might be a better solution for UIMA-5801.  See comments for this and UIMA-5801.

      Attachments

        Issue Links

          Activity

            People

              schor Marshall Schor
              schor Marshall Schor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: