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? |