BeanLifecycleStrategy to use when JPA compliance is required
(i.e. when the bean lifecycle is to be managed by the JPA runtime, not the CDI runtime).
The main characteristic of this strategy is that each requested bean is instantiated directly
and guaranteed to not be shared in the CDI context.
In particular, @Singleton-scoped or @ApplicationScoped beans are instantiated directly by this strategy,
even if there is already an instance in the CDI context.
This means singletons are not really singletons, but this seems to be the behavior required by
the JPA 2.2 spec.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final JpaCompliantLifecycleStrategy | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public <B> ContainedBeanImplementor | createBean(Class<B> beanClass, BeanInstanceProducer fallbackProducer, BeanContainer beanContainer)
Implements org. |
| public <B> ContainedBeanImplementor | createBean(String beanName, Class<B> beanClass, BeanInstanceProducer fallbackProducer, BeanContainer beanContainer)
Implements org. |
| INSTANCE | back to summary |
|---|---|
| public static final JpaCompliantLifecycleStrategy INSTANCE | |
| log | back to summary |
|---|---|
| private static final Logger log | |
| JpaCompliantLifecycleStrategy | back to summary |
|---|---|
| private JpaCompliantLifecycleStrategy() | |
| createBean | back to summary |
|---|---|
| public <B> ContainedBeanImplementor Implements org.
| |
| createBean | back to summary |
|---|---|
| public <B> ContainedBeanImplementor Implements org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private B | |
| private BeanManager | |
| private final Class | |
| private CreationalContext | |
| private BeanInstanceProducer | |
| private InjectionTarget |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public B | getBeanInstance()
Implements org. |
| public void | initialize()
Implements org. |
| public void | release()
Implements org. |
| beanInstance | back to summary |
|---|---|
| private B beanInstance | |
| beanManager | back to summary |
|---|---|
| private BeanManager beanManager | |
| beanType | back to summary |
|---|---|
| private final Class<B> beanType | |
| creationalContext | back to summary |
|---|---|
| private CreationalContext<B> creationalContext | |
| fallbackProducer | back to summary |
|---|---|
| private BeanInstanceProducer fallbackProducer | |
| injectionTarget | back to summary |
|---|---|
| private InjectionTarget<B> injectionTarget | |
| BeanImpl | back to summary |
|---|---|
| public BeanImpl(Class<B> beanType, BeanInstanceProducer fallbackProducer, BeanManager beanManager) | |
| getBeanInstance | back to summary |
|---|---|
| public B getBeanInstance() Implements org. Doc from org. Get the bean instance producer associated with this container-backed bean
| |
| initialize | back to summary |
|---|---|
| public void initialize() Implements org. Doc from org. Allow the container to force initialize the lifecycle-generated bean
| |
| release | back to summary |
|---|---|
| public void release() Implements org. Doc from org. Release any resources
| |
| Modifier and Type | Field and Description |
|---|---|
| private Bean | |
| private B | |
| private BeanManager | |
| private final String | |
| private final Class | |
| private CreationalContext | |
| private BeanInstanceProducer |
| Access | Constructor and Description |
|---|---|
| private | NamedBeanImpl(String beanName, Class<B> beanType, BeanInstanceProducer fallbackProducer, BeanManager beanManager)
|
| Modifier and Type | Method and Description |
|---|---|
| public B | getBeanInstance()
Implements org. |
| public void | initialize()
Implements org. |
| public void | release()
Implements org. |
| bean | back to summary |
|---|---|
| private Bean<B> bean | |
| beanInstance | back to summary |
|---|---|
| private B beanInstance | |
| beanManager | back to summary |
|---|---|
| private BeanManager beanManager | |
| beanName | back to summary |
|---|---|
| private final String beanName | |
| beanType | back to summary |
|---|---|
| private final Class<B> beanType | |
| creationalContext | back to summary |
|---|---|
| private CreationalContext<B> creationalContext | |
| fallbackProducer | back to summary |
|---|---|
| private BeanInstanceProducer fallbackProducer | |
| NamedBeanImpl | back to summary |
|---|---|
| private NamedBeanImpl(String beanName, Class<B> beanType, BeanInstanceProducer fallbackProducer, BeanManager beanManager) | |
| getBeanInstance | back to summary |
|---|---|
| public B getBeanInstance() Implements org. Doc from org. Get the bean instance producer associated with this container-backed bean
| |
| initialize | back to summary |
|---|---|
| public void initialize() Implements org. Doc from org. Allow the container to force initialize the lifecycle-generated bean
| |
| release | back to summary |
|---|---|
| public void release() Implements org. Doc from org. Release any resources
| |