public class ContainerManagedLifecycleStrategy extends Object implements BeanLifecycleStrategy
BeanLifecycleStrategy
to use when CDI compliance is required
(i.e. when the bean lifecycle is to be managed by the CDI runtime, not the JPA runtime).
The main characteristic of this strategy is that every create/destroy operation is delegated
to the CDI runtime.
In particular, @Singleton-scoped or @ApplicationScoped beans are retrieved from the CDI context,
and are not duplicated, in contrast to JpaCompliantLifecycleStrategy
.Modifier and Type | Field and Description |
---|---|
static ContainerManagedLifecycleStrategy |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
<B> ContainedBeanImplementor<B> |
createBean(Class<B> beanClass,
BeanInstanceProducer fallbackProducer,
BeanContainer beanContainer) |
<B> ContainedBeanImplementor<B> |
createBean(String beanName,
Class<B> beanClass,
BeanInstanceProducer fallbackProducer,
BeanContainer beanContainer) |
public static final ContainerManagedLifecycleStrategy INSTANCE
public <B> ContainedBeanImplementor<B> createBean(Class<B> beanClass, BeanInstanceProducer fallbackProducer, BeanContainer beanContainer)
createBean
in interface BeanLifecycleStrategy
public <B> ContainedBeanImplementor<B> createBean(String beanName, Class<B> beanClass, BeanInstanceProducer fallbackProducer, BeanContainer beanContainer)
createBean
in interface BeanLifecycleStrategy
Copyright © 2021 JBoss by Red Hat. All rights reserved.