I installed the jetty CDI module with
java -jar start.jar --add-to-start=cdi
Everthing worked fine till I accidentally copied my app.war to app1.war
in the webapp directory.
Suddenly I got the exception
Caused by: org.jboss.weld.context.ContextNotActiveException:
WELD-001303: No active contexts for scope type
I found out that jetty creates two contexts app and app1 but CDI only
works in one of those contexts. If I copy app.war to app2.war I have 3
Contexts but CDI works only in one.
I found this bug report regarding "WELD-2497 Weld API - make it possible
to propagate built-in contexts"
So I have 3 questions at the moment:
a) Could somebody explain what's going on here. There are some threads
on stackoverflow but I don't understand what the real problem is.
b) Is WELD-2497 the fix for my problem?
c) I ist possible to use Weld3.1 with jetty?