开发者

Glassfish and java:comp/BeanManager

开发者 https://www.devze.com 2023-02-10 21:22 出处:网络
I have .war application that I deploy to glassfish. I want to do CDI开发者_如何学Python, so I need to lookup java:comp/BeanManager from my POJO. But it does not work: BeanManager simply not found!

I have .war application that I deploy to glassfish. I want to do CDI开发者_如何学Python, 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号