Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] WAR overlays in Jetty 9.1?


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: 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.


On 6 December 2013 18:04, Klaus Brunner <klaus.brunner@xxxxxxxxx> wrote:
> 2013/12/6 Klaus Brunner <klaus.brunner@xxxxxxxxx>:
>> 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:
>> ).
> 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
> (at least on GlassFish,
> the project works just fine without the web.xml).
> Klaus
> _______________________________________________
> jetty-users mailing list
> jetty-users@xxxxxxxxxxx

Jan Bartel <janb@xxxxxxxxxxx>
'Expert Jetty/CometD developer,production,operations advice'

Back to the top