Sun GlassFish Enterprise Server 2.1 Performance Tuning Guide

Entity Beans

Depending on the usage of a particular entity bean, one should tune max-cache-size so that beans that are used less (for example, an order that is created and never used after the transaction is over) are cached less, and beans that are used frequently (for example, an item in the inventory that gets referenced very often), are cached more in numbers.