public class CdiObjectFactory extends ObjectFactory
struts.objectFactory.cdi.jndiKey is given, this key will be looked upCDI_JNDIKEY_BEANMANAGER_COMPCDI_JNDIKEY_BEANMANAGER_APPCDI_JNDIKEY_BEANMANAGER_COMP_ENV| Modifier and Type | Field and Description | 
|---|---|
| protected javax.enterprise.inject.spi.BeanManager | beanManager | 
| static String | CDI_JNDIKEY_BEANMANAGER_APPThe key under which the BeanManager can be found according to JBoss Weld docs | 
| static String | CDI_JNDIKEY_BEANMANAGER_COMPThe key under which the BeanManager can be found according to CDI API docs | 
| static String | CDI_JNDIKEY_BEANMANAGER_COMP_ENVThe key under which the BeanManager can be found in pure Servlet containers according to JBoss Weld docs. | 
| static String | STRUTS_OBJECT_FACTORY_CDI_JNDI_KEY | 
| Constructor and Description | 
|---|
| CdiObjectFactory() | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | buildBean(String className,
         Map<String,Object> extraContext,
         boolean injectInternal) | 
| protected javax.enterprise.context.spi.CreationalContext | buildNonContextualCreationalContext(javax.enterprise.inject.spi.BeanManager beanManager)Simple wrapper for CreationalContext creation. | 
| protected javax.enterprise.inject.spi.BeanManager | findBeanManager()Try to find the CDI BeanManager from JNDI context. | 
| protected javax.enterprise.inject.spi.InjectionTarget<?> | getInjectionTarget(Class<?> clazz)Get a InjectionTarget instance for a given class. | 
| boolean | isNoArgConstructorRequired()Allow constructor injection | 
| protected javax.enterprise.inject.spi.BeanManager | lookup(Context context,
      String jndiKeyToCheck)Lookup the given JNDI key in the given context. | 
| void | setJndiKey(String jndiKey) | 
buildAction, buildBean, buildBean, buildConverter, buildInterceptor, buildResult, buildUnknownHandler, buildValidator, getClassInstance, injectInternalBeans, setActionFactory, setClassLoader, setContainer, setConverterFactory, setInterceptorFactory, setResultFactory, setUnknownHandlerFactory, setValidatorFactorypublic static final String CDI_JNDIKEY_BEANMANAGER_COMP
public static final String CDI_JNDIKEY_BEANMANAGER_APP
public static final String CDI_JNDIKEY_BEANMANAGER_COMP_ENV
public static final String STRUTS_OBJECT_FACTORY_CDI_JNDI_KEY
protected javax.enterprise.inject.spi.BeanManager beanManager
public void setJndiKey(String jndiKey)
protected javax.enterprise.inject.spi.BeanManager findBeanManager()
CDI_JNDIKEY_BEANMANAGER_COMP will be tested. If nothing is found there, the key CDI_JNDIKEY_BEANMANAGER_APP will be checked. If still nothing is found there, the key CDI_JNDIKEY_BEANMANAGER_COMP_ENV will be checked.protected javax.enterprise.inject.spi.BeanManager lookup(Context context, String jndiKeyToCheck)
context - the context to use for lookup.jndiKeyToCheck - the key to lookup.NamingException was thrown.public Object buildBean(String className, Map<String,Object> extraContext, boolean injectInternal) throws Exception
buildBean in class ObjectFactoryExceptionprotected javax.enterprise.inject.spi.InjectionTarget<?> getInjectionTarget(Class<?> clazz)
clazz - The class to get a InjectionTarget instance for.protected javax.enterprise.context.spi.CreationalContext buildNonContextualCreationalContext(javax.enterprise.inject.spi.BeanManager beanManager)
beanManager - the BeanManager to use for creating the context.public boolean isNoArgConstructorRequired()
isNoArgConstructorRequired in class ObjectFactoryCopyright © 2000–2025 Apache Software Foundation. All rights reserved.