Follow these tips when using the EJB cache and pools to improve performance:
Explicitly call remove(): Allow stateful session EJB components to be removed from the container cache by explicitly calling of the remove() method in the client.
Tune the entity EJB component’s pool size: Entity Beans use both the EJB pool and cache settings. Tune the entity EJB component’s pool size to minimize the creation and destruction of beans. Populating the pool with a non-zero steady size before hand is useful for getting better response for initial requests.
Cache bean-specific resources: Use the setEntityContext() method to cache bean specific resources and release them using the unSetEntityContext() method.
Load related data efficiently for container-managed relationships (CMRs). For more information, see Pre-fetching Container Managed Relationship (CMR) Beans
Identify read-only beans: Configure read-only entity beans for read only operations. For more information, see Read-Only Entity Beans