Class ContainerManagedLifecycleStrategy
- java.lang.Object
-
- org.hibernate.resource.beans.container.internal.ContainerManagedLifecycleStrategy
-
- All Implemented Interfaces:
BeanLifecycleStrategy
public class ContainerManagedLifecycleStrategy extends Object implements BeanLifecycleStrategy
ABeanLifecycleStrategy
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 toJpaCompliantLifecycleStrategy
.
-
-
Field Summary
Fields Modifier and Type Field Description static ContainerManagedLifecycleStrategy
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
Field Detail
-
INSTANCE
public static final ContainerManagedLifecycleStrategy INSTANCE
-
-
Method Detail
-
createBean
public <B> ContainedBeanImplementor<B> createBean(Class<B> beanClass, BeanInstanceProducer fallbackProducer, BeanContainer beanContainer)
- Specified by:
createBean
in interfaceBeanLifecycleStrategy
-
createBean
public <B> ContainedBeanImplementor<B> createBean(String beanName, Class<B> beanClass, BeanInstanceProducer fallbackProducer, BeanContainer beanContainer)
- Specified by:
createBean
in interfaceBeanLifecycleStrategy
-
-