Originally posted by Santosh Ram:
1. The container can choose to passivate an entity bean instance with in a transaction. Why is this allowed on Entity Beans and not on Session Beans?
The concept of passivation is different for Session beans and Entity beans. Passivation/Activation of a Session bean is related to the serialization/deserialization of Session beans state data while the passivation/activation for Entity beans means swapping the beans in and out of the pool.Both are for the same purpose - preservation of resources.
If the container did not passivate entity beans in prolonged transactions, then this could easily lead to scalability issues, both at the Container and the database level.
2. Can't we do a ejbFind<method>(args) on a bean instance that is in READY state?. IF not why?
No. The Container always executes finder methods in beans that are in a pooled state. Finder methods are more like global methods. Entity beans in the Ready state are different from each other while the entity beans in the pooled state have no unique identity and all beans of the same type are the same. So any bean could be picked up by the Container to execute your finder method.