Class ContainerManagedLifecycleStrategy
java.lang.Object
org.hibernate.resource.beans.container.internal.ContainerManagedLifecycleStrategy
- All Implemented Interfaces:
BeanLifecycleStrategy
A
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
.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription<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 Details
-
INSTANCE
-
-
Method Details
-
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
-