Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6593

Some thread-local contexts may get lost on the client side after a refresh

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.3, 2.7.18, 3.0.7
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      CXF JAX-RS keeps references to thread local proxies which have been injected into class resources or providers in a weak hash map, with the map itself set as a property on a bus.

      Previously there were kept in a plain hash map but in containers like TomEE this was resulting in a the wars being not released due to the default/shared bus still being around, while keeping the strong references.

      Having a weak hash map apparently has some difficult to reproduce side-effects on the client side where some refreshes are happening.

      The short term solution is to protect against possible NPE in thread local proxy implementations which represent contexts that might be used on the client side. This is Providers (used by CXF providers and Jackson) and CXF MessageContext.

      A more effective solution would need to be done on the new trunk due to the high sensitivity of the possible refactoring of the way thread local proxies are implemented, etc...

        Attachments

          Activity

            People

            • Assignee:
              sergey_beryozkin Sergey Beryozkin
              Reporter:
              sergey_beryozkin Sergey Beryozkin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: