[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba updated WELD-2223 Weld / WELD-2223 Registering servlet listener on tomcat embedded fails when container bootstrapped outside Change By: Martin Kouba Status: Pull Request Sent Resolved Resolution: Done Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba updated an issue Weld / WELD-2223 Registering servlet listener on tomcat embedded fails when container bootstrapped outside Change By: Martin Kouba Git Pull Request: https://github.com/weld/core/pull/1623 , https://github.com/weld/core/pull/1624 Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Issue was automatically transitioned when Martin Kouba created pull request #1623 in GitHub Weld / WELD-2223 Registering servlet listener on tomcat embedded fails when container bootstrapped outside Change By: Martin Kouba Status: Reopened Pull Request Sent Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba updated WELD-2223 Weld / WELD-2223 Registering servlet listener on tomcat embedded fails when container bootstrapped outside Change By: Martin Kouba Status: Pull Request Sent Git Pull Request: https://github.com/weld/core/pull/1623 Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba commented on WELD-2223 Re: Registering servlet listener on tomcat embedded fails when container bootstrapped outside John Ament Good to know. Actually, I started to write a test for this and realized that the events are not fired since 2.3.3.Final (fixed in WELD-2077) but the synchronized block is still executed (hence the issue). Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title John Ament commented on WELD-2223 Re: Registering servlet listener on tomcat embedded fails when container bootstrapped outside BTW, Tomcat has fixed their upstream issue with this. Starting with 9.0.0.M18, they have the ability to make this single threaded with fixes it as well. Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba updated an issue Weld / WELD-2223 Registering servlet listener on tomcat embedded fails when container bootstrapped outside Change By: Martin Kouba Fix Version/s: 2.4.3.Final Fix Version/s: 3.0.0.Final Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba commented on WELD-2223 Re: Registering servlet listener on tomcat embedded fails when container bootstrapped outside It seems to me, in this situation, the initialized event should not be fired from HttpContextLifecycle... I tend to agree. So the only @Initialized(ApplicationScoped.class) event would be fired from Weld SE bootstrap (org.jboss.weld.environment.se.events.ContainerInitialized as a payload). Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba updated an issue Weld / WELD-2223 Registering servlet listener on tomcat embedded fails when container bootstrapped outside Change By: Martin Kouba Component/s: Java SE Support Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba commented on WELD-2223 Re: Registering servlet listener on tomcat embedded fails when container bootstrapped outside Ok, so I think I understand the issue better. What's really happening is a dead lock between the two threads, simply because they're both locking on the same object. The second thread is derived from the first, so the lock never gets cleared. Yes, Tomcat is started from within AfterDeploymentValidation notification when the lock is already held. Thoughts? Hm yes, we would have either to delay @Initialized(ApplicationScoped.class) or change the lock object. Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title John Ament commented on WELD-2223 Re: Registering servlet listener on tomcat embedded fails when container bootstrapped outside Ok, so I think I understand the issue better. What's really happening is a dead lock between the two threads, simply because they're both locking on the same object. The second thread is derived from the first, so the lock never gets cleared. It seems to me, in this situation, the initialized event should not be fired from HttpContextLifecycle (it is fired in all 3 containers) since the container isn't bootstrapped from Weld Servlet. I hate to say it, but adding another boolean to the constructor for lifecycle may make the most sense. Thoughts? Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title John Ament commented on WELD-2223 Re: Registering servlet listener on tomcat embedded fails when container bootstrapped outside But that's not the case here. The first event being fired is `AfterDeploymentValidation` but then in tomcat you're firing `@Initialized(ApplicationScoped.class)` - however I suspect that shouldn't get fired. I don't believe it's fired for undertow, jetty, haven't quite figured out why its fired for Tomcat. Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title Martin Kouba commented on WELD-2223 Re: Registering servlet listener on tomcat embedded fails when container bootstrapped outside Yep, we use the container instance as a lock to ensure all the container lifecycle observer methods are called sequentially and also to ensure @Initialized(ApplicationScoped.class) are called sequentially. Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title John Ament updated an issue Weld / WELD-2223 Registering servlet listener on tomcat embedded fails when container bootstrapped outside Change By: John Ament Summary: Registering servlet listener on tomcat embedded fails when container bootstrapped outside Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues
[weld-issues] [JBoss JIRA] (WELD-2223) Registering servlet listener on tomcat embedded fails when container bootstrapped outside
Title: Message Title John Ament edited a comment on WELD-2223 Re: Registering servlet listener on tomcat embedded fails when container bootstrapped outside i was able to dig into this a bit deeper w/ some tomcat guysWhat I'm seeing is that during the execution of tomcat bootstrap during ` {{ AfterDeploymentValidation ` }} this synchronized block causes a deadlock on the calling threadhttps://github.com/weld/core/blob/2.4/impl/src/main/java/org/jboss/weld/servlet/HttpContextLifecycle.java#L140I'm going to try to dig in further to take a thread dump. Add Comment This message was sent by Atlassian JIRA (v7.2.3#72005-sha1:73be91d) ___ weld-issues mailing list weld-issues@lists.jboss.org https://lists.jboss.org/mailman/listinfo/weld-issues