SeamFramework.orgCommunity Documentation
Although discouraged as a general practice, there are circumstances access to the BeanManager
is required outside of the CDI context. Seam Servlet includes a provider that retrieves the
BeanManager
from the Servlet context attribute named
javax.enterprise.inject.spi.BeanManager
, an alternative to the standard JNDI lookup mechanism
defined in the JSR-299 specification. The Servlet module also handles binding the BeanManager
to this attribute when the application is initialized. The work is performed in a CDI observer that is notified by
the Servlet-CDI bridge provided by this very module.
Refer to the BeanManager
provider chapter of the Weld Extensions reference guide for information on how to leverage the Servlet
context provider to access the BeanManager
from outside the CDI environment.