hk2
  1. hk2
  2. HK2-71

ServiceLocatorUtilities.enablePerThreadScope functionality is broken in OSGi environment

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.1.*
    • Fix Version/s: 2.1.*
    • Component/s: None
    • Labels:
      None

      Description

      ServiceLocatorUtilities.enablePerThreadScope method binds hk2-api bundle internal, PerThreadContext, class.
      When ServiceHandleImpl class from hk2-locator is trying to retrieve the above context, it fails as hk2-locator bundle class loader is being used,
      which does not see the PerThreadContext class. In a non-OSGi environment, this is not an issue, but it breaks in GF.

      Attaching a patch, we put together with Marek and tested to resolve the issue.

      1. patch
        7 kB
        Jakub Podlesak

        Issue Links

          Activity

          Hide
          jwells added a comment -

          This was fixed with the supplied fix.

          Show
          jwells added a comment - This was fixed with the supplied fix.

            People

            • Assignee:
              jwells
              Reporter:
              Jakub Podlesak
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: