I have read that when ejbPassivate()
is called Stateful Session Beans are usually evicted but Entity Beans and Stateless Beans are pooled which means they are not appilicable for passivation.
In another article I have read that activation and passivation is applicable only for Stateful Session Beans and Entity Beans which is a contrast to the claim that Entity Beans and Stateless Beans are pooled.
For what beans does the passivation apply and what does really happen when they do?
Passivation and Activation only apply to EJBs that have state, namely stateful session beans and entity beans.
Passivation is the process by which any state a given bean has is moved into storage.
Activation is the process by which any state that a given bean previously had is loaded from storage.
This mechanism is needed because the EJB contain creates a pool of each bean type but gives the illusion that there are an infinate number of each bean, loading and storing them using the ejbActive and ejbPassivate methods respectively as needed.
The full life-cycle of each bean type is described here:
Stateless Session Bean
Stateful Session Bean
Entity Bean
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With