Objctive 5.1: State the benefits of bean pooling in an EJB container
Bean Pooling
Performance: EJBs are heavy objects. By pooling these objects, repeating creation and deletion is avoided. Instead, pooled objects are recycled amongst method calls, which makes more efficient use of resources.Scalability: Pools can be expanded/contracted as demand requires.
Objective 5.2: State the benefits of Passivation in an EJB container
Passivation
Performance: To free up resources, swap out unused objects and activate then if requiredDo not store EntityConext/SessionContext, UserTransactions, JNDI contexts as transient as they are passivated by the container
If the container cannot passivate an object it may destroy the instance.
NOTE:
Passivation is only available to stateful session and entity beans because these are the two types with state.
									
									
NOTE:
Before passivation, all non-transient, non-serializable attributes need to be set to null.