uCosminexus Application Server, EJB Container Functionality Guide

[Contents][Glossary][Index][Back][Next]

2.9.2 Pooling of Entity Beans

The pooling of Entity Beans is a functionality to pool the Entity Beans based on the access volume from the client. In the EJB container, you create a pool for each Entity Bean and manage these pools. By specifying the maximum and minimum values, the pooling operation can be customized.

When a J2EE application is started, Entity Beans equivalent to the minimum value are generated and pooled. The number of pooled Entity Beans will be between the maximum and minimum values, depending upon the access volume from the client.

The pooled Entity Beans are in two states, namely the ready state and the pool state.

Ready-state Entity Beans
The data is read from the database into the instance and has the identity as an Entity Bean. The Entity Beans in the ready state are already in the state in which they can be executed when accessed from the client.

Pool-state Entity Beans
The data is not read from the database into the instance and does not have the identity as an Entity Bean. The Entity Beans in the pool state are activated once, change to ready state, and then to the executable state.

When the Entity Beans in the ready state become large in number, several of them are passivated and change to the pool state. At this point, however, from among the Entity Beans in the ready state, those engaged in a transaction are not passivated.