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

Weld vs Undertow bootstrap: Race condition

XMLWordPrintable

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

      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

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

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

                Created:
                Updated:
                Resolved: