[
https://issues.jboss.org/browse/WFLY-11601?page=com.atlassian.jira.plugin...
]
Matej Novotny edited comment on WFLY-11601 at 1/16/19 7:07 AM:
---------------------------------------------------------------
[~swd847] do you think it would make sense to change {{UndertowDeploymentService}} to
depend on {{WeldStartCompletionService}}?
For non-web modules it is indeed {{WeldStartCompletionService}} that triggers
{{WeldBootstrap.endInitialization()}} which in turn fire initialized event for application
context. This is the case for the JAR, though I am not quite seeing how it gets completely
swallowed once Undertow service finishes first..
was (Author: manovotn):
[~swd847] do you think it would make sense to change {{UndertowDeploymentService}} to
depend on {{WeldStartCompletionService}}?
For non-web modules it is indeed {{WeldStartCompletionService}} that triggers
{{WeldBootstrap.endInitialization()}} which in turn fire initialized event for application
context.
Weld vs Undertow bootstrap: Race condition
------------------------------------------
Key: WFLY-11601
URL:
https://issues.jboss.org/browse/WFLY-11601
Project: WildFly
Issue Type: Bug
Components: CDI / Weld, Web (Undertow)
Affects Versions: 15.0.1.Final
Reporter: Ste Gr
Assignee: Matej Novotny
Priority: Major
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|https://issues.jboss.org/browse/WELD-2557?focusedCommentId=1368...].
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
--
This message was sent by Atlassian Jira
(v7.12.1#712002)