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

ChainInitiationObserver lack synchronization which could causes continuations to malfunction for some rare scenario

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.10
    • 2.3, 2.2.11
    • None
    • None

    Description

      If we call continuation.resume in another thread after we call continuation.suspend immediately, we may encounter a situation where resume is called on continuation before the SuspendedInvocationException causes PhaseInterceptorChain to change state to 'paused', so that ChainInitiationObserver instead of resuming the the PhaseInterceptorChain from where it was suspended, it starts it's from the beginning. This is incorrect as interceptors that has already been run are called again in this case.

      With this attached testcase which expose this problem, simply use continuation api in a jaxws provider, we can see the IncomingMessageCounterInterceptor get invoked twice for one incoming messsage intermittently.

      Attachments

        1. testcase.patch
          16 kB
          Freeman Yue Fang

        Activity

          People

            ffang Freeman Yue Fang
            ffang Freeman Yue Fang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: