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

Stop blocking executor thread on microprofile rest asynchronous call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.3.6, 3.2.13
    • 3.2.14, 3.3.7, 3.4.0
    • MicroProfile
    • None
    • Unknown

    Description

      Hello, while digging into the way implementation for microprofile was done to understand how I can override the default executor and how it is used behind the scene, I found that the microprofile futures are actually created using CompletableFuture.supplyAsync using the given executor or default one defined by CXF and calling wait on it. If not mistaken this should block the executor thread until it is resumed by async handler. This is a major issue for us as we were expecting pure asynchronous processing to avoid defining executors with many threads.

      If everything I say is correct I have tried to implement a naive implementation creating a future using constructor that is not waiting but will be completed by asynchronous handler

      Attachments

        1. cxf-microprofile.zip
          6 kB
          Baptiste AIGLIN

        Issue Links

          Activity

            People

              reta Andriy Redko
              baiglin Baptiste AIGLIN
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m