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. changes.diff
          33 kB
          Stefan Gr
        2. deploy-failed.txt
          16 kB
          Stefan Gr
        3. deploy-mixed-success.txt
          17 kB
          Stefan Gr
        4. deploy-success.txt
          17 kB
          Stefan Gr
        5. test-app-1.0.0.war
          6 kB
          Stefan Gr

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

                Created:
                Updated:
                Resolved: