Oracle® Application Server Containers for J2EE Enterprise JavaBeans Developer's Guide
10g Release 2 (10.1.2) Part No. B15505-01 |
|
![]() Previous |
![]() Next |
You can manage the entity bean lifecycle through configuring pool sizes for your entity beans. This subject is covered in the following section:
You can set the minimum and maximum number of the bean instance pool, which contains EJB implementation instances that currently do not have assigned state. While the bean instance is in pool state, it is generic and can be assigned to a wrapper instance.
You can set the pool number with the following attributes of the <entity-deployment>
element.
The max-instances
attribute sets the maximum entity bean instances to be allowed in the pool. An entity bean is set to a pooled state if not associated with a wrapper instance. Thus, it is generic.
The default is 0, which means infinite. If you wanted to set the maximum bean implementation instances to 20, you would do as follows:
<entity-deployment ... max-instances="20" ... </entity-deployment>
The min-instances
attribute sets the minimum number allowed in the pool as follows:
<entity-deployment ... min-instances="2" ... </entity-deployment>