Uploaded image for project: 'Commons Chain'
  1. Commons Chain
  2. CHAIN-62

Use of thread context ClassLoader under OSGi

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.2
    • None
    • None
    • None
    • OSGi

    Description

      The CatalogFactory#getInstance() is using thread context ClassLoader which gives undefined behavior under OSGi.

      This leads to problems with ConfigCatalogRule and especially LookupCommand.

      Two bundles wired to same commons chain may use different catalog factories when parsing commands from XML or looking up commands from catalog.

      I think that CatalogFactory#getClassLoader() might allow disabling use of thread context class loader - either

      a) detect that it is used inside OSGi framework, or
      b) provide static boolean flag to disable it

      Combination of both might be via use of bundle activator that would set the flag. The activator would be used only under OSGi acting as "auto-detection" and still some other bundle might revert to default if required.

      Ales

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            alesd Ales Dolecek

            Dates

              Created:
              Updated:

              Slack

                Issue deployment