Module org.eclipse.persistence.core
Class InjectionManagerImpl<T>
- java.lang.Object
-
- org.eclipse.persistence.internal.sessions.cdi.InjectionManagerImpl<T>
-
- All Implemented Interfaces:
InjectionManager<T>
public class InjectionManagerImpl<T> extends Object implements InjectionManager<T>
Manages calls to CDI to inject into managed beans This class will be created reflectively to avoid dependencies on CDI classes in environments that do not support CDI
-
-
Field Summary
Fields Modifier and Type Field Description protected jakarta.enterprise.inject.spi.BeanManagerbeanManagerprotected jakarta.enterprise.context.spi.CreationalContext<T>creationalContextprotected Map<T,jakarta.enterprise.inject.spi.InjectionTarget<T>>injectionTargets-
Fields inherited from interface org.eclipse.persistence.internal.sessions.cdi.InjectionManager
DEFAULT_CDI_INJECTION_MANAGER
-
-
Constructor Summary
Constructors Constructor Description InjectionManagerImpl(Object beanManagerInstance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanUp(AbstractSession session)TcreateManagedBeanAndInjectDependencies(Class<T> managedBeanClass)Creates an instance of the CDI managed bean.
-
-
-
Constructor Detail
-
InjectionManagerImpl
public InjectionManagerImpl(Object beanManagerInstance) throws NamingException
- Throws:
NamingException
-
-
Method Detail
-
createManagedBeanAndInjectDependencies
public T createManagedBeanAndInjectDependencies(Class<T> managedBeanClass) throws NamingException
Creates an instance of the CDI managed bean. Calls CDI API to inject into the bean.- Specified by:
createManagedBeanAndInjectDependenciesin interfaceInjectionManager<T>- Parameters:
managedBeanClass- bean class to be instantiated.- Returns:
- New instance of bean class with injected content.
- Throws:
NamingException
-
cleanUp
public void cleanUp(AbstractSession session)
- Specified by:
cleanUpin interfaceInjectionManager<T>
-
-