Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-11601

Weld vs Undertow bootstrap: Race condition

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 15.0.1.Final
    • CDI / Weld, Web (Undertow)
    • None

    Description

      WFLY-9732 / WFLY-10784 moves the completion of WELD from the WeldStartService to WeldStartCompetionService. This causes a race condition with the UndertowDeploymentService which executes the servlet listeners for context-initialized which again fires ApplicationScope-initialized events in CDI.

      You can find more in WELD-2557.

      In short: WeldStartCompletionService and UndertowDeploymentService pushes the logic to the executor service. It may happen, that the logik of undertow runs before the weld completion. Events fired in the servlet listeners won't find all event observers.

      A possible solution would bo to set the WeldStartCompletionService as a dependency of the UndertowDeploymentService

      Attachments

        1. changes.diff
          33 kB
        2. deploy-failed.txt
          16 kB
        3. deploy-mixed-success.txt
          17 kB
        4. deploy-success.txt
          17 kB
        5. TestApp.zip
          7 kB
        6. test-app-1.0.0.war
          6 kB
        7. TestLib.zip
          3 kB
        8. weld-core-impl-3.0.5.Final.jar
          1.60 MB
        9. weld-core-impl-3.0.5.Final.jar
          1.60 MB

        Issue Links

          Activity

            People

              manovotn Matěj Novotný
              ste_gr Stefan Gr (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: