You can (and how to) use javax in EJB modules naming. Context #lookup find CDI managed beans?

Yes (if so, how?) Using javax. XML in EJB modules naming. Context #lookup find CDI managed beans?

I use GlassFish v3 I think I can use @ named, but what is the JNDI name managed by CDI? I want to find them from unmanaged POJOs, so I can't use @ inject

Solution

You can find the beanmanager through JNDI (Java: comp / beanmanager), and then use the JSR 299 API closed from the beanmanager to obtain the context reference to the managed bean

JSR 299 managed beans are not available for direct JNDI lookup

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>