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

Allow creating a custom CXFHttpAsyncResponseConsumer

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.7, 3.6.2, 4.0.3
    • 3.5.8, 3.6.3, 4.0.4
    • None
    • None
    • Unknown

    Description

      We recently got a bug report in Quarkus CXF complaining about non-working context propagation with CXF HC5 client.
      The problem was that if the client is called in context of a Quarkus REST endpoint, whose vert.x thread has the request context setup properly, the request scoped beans are then not accessible e.g. from ContainerRequestFilters which run in in a different thread.

      To make it work, we would need wrap the creation of CXFHttpAsyncResponseConsumer in some code storing the context of the creation thread into a wrapping method that can then be executed by some other thread. I was able to do this by overriding some default classes. What I did can be seen around here: https://github.com/quarkiverse/quarkus-cxf/pull/950/files#diff-568a3d75d004f9f41c6130854755ebb2beae2f30308cc45aa98492d09bac2ecc

      This solution is by no means elegant and I wonder whether it would be feasible to implement some new API to allow creating custom CXFHttpAsyncResponseConsumers?

      Maybe we could introduce some kind of CXFHttpAsyncResponseConsumerFactory?
      I am quite new to CXF internals, so I'd be thankful for any hints how to proceed.

      Attachments

        Issue Links

          Activity

            People

              reta Andriy Redko
              ppalaga Peter Palaga
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: