If an EJB is injected by CDI container using @Inject
, because that CDI has scope, that means this EJB will have scope and it's lifecycle will be controlled by CDI container instead of EJB container?
Or the CDI container only injects and the lifecycle is controlled by EJB container?
For example: I implement a SLSB which has it's lifecycle controled by EJB container. It means that the EJB container will control the creation, pooling and destruction of the bean.
By default CDI bean has Dependent scope. If I inject this SLSB using @Inject
CDI will control the bean's lifecycle so that it will be created and destroyed every time the parent class is created and destroyed? If that is true the EJB lost the concurrence characteristics (pool of bean).