I've been having a similar issue for a while as well. I have war files that contain application initialization listeners (@Observes @Initialized(ApplicationScoped.class)) that occasionally are not invoked. No errors in the logs, and as Ste Gr points out, the debug or trace logging from Weld shows that it does find them. I haven't be able to reproduce with a minimal test case. As I slim down my deployments the problem stops occurring, but the intermittent nature of the problem makes it hard to tell if a change I made solves the problem or if it just didn't occur that time. On the other hand, perhaps it's the "larger" deployments (and several of them in the same container) that trigger the possible race condition described above. I don't know if this helps at all, but I never saw this behavior on WildFly 10.1.0.Final but did start seeing it with 14.0.0.Final. I never tried an versions between them to pin it down. |