could you share your code?
Or, ideally, a reproducer?
Your scenario sounds valid to me and so does your deployment.
But I suppose there is a catch somewhere which I cannot glance from just the description.
----- Original Message -----
From: "Alex Sviridov" <ooo_saturn7(a)mail.ru>
To: "weld-dev" <weld-dev(a)lists.jboss.org>
Sent: Tuesday, March 6, 2018 12:10:51 PM
Subject: [weld-dev] How to inject in servlet CDI beans from war/lib?
Could anyone help me with the following problem. I have a war that contains
In WEB-INF of the war I have beans.xml. Besides, inside this war, in lib
folder I have
a jar archive. Jar archive has beans.xml in META-INF.
I use GlassFish 5 that uses Weld. When I want to inject in servlet CDI bean
container doesn't inject anything - field is null, and no errors I get.
I inject in servlet EJB bean everything works fine.
How to fix it?
Best regards, Alex Sviridov
weld-dev mailing list