Sun Microsystems 820434310 Server User Manual


 
For example, enable threadpools named priority-1 and priority-2 to the <orb> element as
follows:
<orb max-connections="1024" message-fragment-size="1024"
use-thread-pool-ids="thread-pool-1,priority-1,priority-2">
Include the threadpool ID inthe use-thread-pool-id element of the EJB component’s
sun-ejb-jar.xml deployment descriptor.
For example, the following sun-ejb-jar.xml deployment descriptor for an EJB component
named “TheGreeter” is assigned to a thread pool named priority-2 :
<sun-ejb-jar>
<enterprise-beans>
<unique-id>1</unique-id>
<ejb>
<ejb-name>TheGreeter</ejb-name>
<jndi-name>greeter</jndi-name>
<use-thread-pool-id>priority-1</use-thread-pool-id>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
Restart the Application Server.
Tuning Tips for Specic Types of EJB Components
This section provides tips for tuning various specic types of EJB components:
“Entity Beans” on page 42
“Stateful Session Beans” on page 42
“Stateless Session Beans” on page 43
“Read-Only Entity Beans” on page 43
“Pre-fetching Container Managed Relationship (CMR) Beans” on page 44
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.
Stateful Session Beans
When a stateful bean represents a user, a reasonable max-cache-size of beans is the expected
number of concurrent users on the application server process. If this value is too low (in relation
3
4
EJB PerformanceTuning
SunGlassFishEnterpriseServer2.1PerformanceTuningGuide January200942