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

Concurrency issue with AsyncHandler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.6
    • 2.2.7
    • None
    • OW2 JOnAS 5.2

    Description

      The problem is on the access to the ClientCallback.done boolean

      You can have a situation where the client uses the Future object he got from the dispatch.invokeAsync() method.
      It performs an active wait using Future.isDone()

      On another Thread, the WS response comes back, and the JaxwsClientCallback.handlerResponse() is called. The handler provided by the client is called, so far everything went well. After the AsyncHandler.handleResponse() invocation, the ClientCallback set the 'done' boolean to true.

      But this value change is never seen by the Future.isDone() invocations!

      Because the ClientCallback.done boolean is not 'volatile'.

      I've made a try with a volatile 'done' and it works perfectly.

      Could it be possible that this simple change makes it to the 2.2.7 ?

      Attachments

        1. CXF-2711.patch
          0.6 kB
          Guillaume Sauthier

        Activity

          People

            dkulp Daniel Kulp
            sauthieg Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: