I have .war application that I deploy to glassfish. I want to do CDI, so I need to lookup java:comp/BeanManager from my POJO. But it does not work: BeanManager simply not found!
What is wrong?
Do I need to enable CDI in glassfish? Or it works only in .ear files?
thanks.
Do you have an empty beans.xml under WEB-INF folder? Without beans.xml, CDI is not enabled.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With