Klaus, Thanks for the test webapp. You'll need to declare your test.ContextListener in a web.xml to test.
Even doing that, weld still need to apply this patch: https://github.com/weld/core/pull/431 to bring their impl up-to-date with the jetty-9.1 api. However, I have to say that weld's current jetty integration isn't going to be able to inject a Listener because they are hooking into the deployment lifecycle too late. Their implementation sets up a ServletContextListener that decides which container it has been deployed into on the call to contextInitialized(), and then goes on to do some container-specific setup. That's too late to be able to inject a listener, as the listeners are clearly already being called back during their startup sequence! Jetty injects listeners just after they are created. Its very late here, but I'll give some thought over the weekend to a better way that weld may be able to use to ensure that Listeners would be able to be injected when running in jetty. cheers Jan On 6 December 2013 18:04, Klaus Brunner <[email protected]> wrote: > 2013/12/6 Klaus Brunner <[email protected]>: >> Right now it definitely does not work (using a patched version of Weld >> 2.1 and the latest Jetty 9.1.0 release with this trivial CDI test app: >> https://github.com/KlausBrunner/cditest ). > > Adding to that: it doesn't work regardless of whether it's only > annotated or also referenced from the web.xml, and it doesn't matter > if I use the released Jetty version or the latest code on github with > Jan's commits. The web.xml I'm using is > https://gist.github.com/KlausBrunner/7819690 (at least on GlassFish, > the project works just fine without the web.xml). > > Klaus > _______________________________________________ > jetty-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/jetty-users -- Jan Bartel <[email protected]> www.webtide.com 'Expert Jetty/CometD developer,production,operations advice' _______________________________________________ jetty-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/jetty-users
