cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tadayosi <>
Subject [GitHub] cxf pull request #187: [CXF-7109] ClientCallback may be invoked twice when A...
Date Wed, 26 Oct 2016 00:54:22 GMT
GitHub user tadayosi opened a pull request:

    [CXF-7109] ClientCallback may be invoked twice when Async HTTP Transport is used
    I think the best way to make a client callback invoked once and only once is to remove
from the exchange immediately after its `handle***()` method is invoked once. It should prevent
a client callback from being called more than once not only for the [CXF-7109](
case but also for any other potential cases where the callback may be invoked more than once
    I added `remove(Class<T>)` to `Exchange` (`StringMap`) for convenience and symmetry.
It is necessary to remove the callback right before calling its `handle***()`, as otherwise
some other thread may grab it concurrently before the current thread invokes `handle***()`.
    I also added a test case `AsyncHTTPConduitTest#testCallAsyncCallbackInvokedOnlyOnce()`,
but please note this test fails only on RHEL 6.8 even without this fix. In order to check
if this fix is really effective, you need to run the test on RHEL 6.8 to compare the results.

You can merge this pull request into a Git repository by running:

    $ git pull CXF-7109

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #187
commit 4eb81d3044c0f663d580cdbd3b611d5e3b1b4ac5
Author: Tadayoshi Sato <>
Date:   2016-10-25T09:45:42Z

    [CXF-7109] ClientCallback may be invoked twice when Async HTTP Transport is used


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message