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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1.3, 2.7.18, 3.0.7
    • JAX-RS
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: