Show TOC Start of Content Area

Function documentation Pool Properties  Locate the document in its SAP Library structure

Use

The EJB Container keeps the stateless session, entity, and message-driven bean instances in data structures called pools. All instances in a pool are equivalent and the EJB Container chooses a random instance to serve a particular client request.

The EJB Container manages the number of active instances in the pool depending on the client’s workload and the bean’s deployment properties in ejb-j2ee-engine.xml. Despite the fact that the clients call the create and remove methods of the bean’s home or local home interfaces, the EJB Container actually handles these calls. Typically, the required number of instances in the EJB Container is smaller than the number of the active clients, because the bean instance can execute requests from different transactions.

For more information how to determine the number of bean instances in the pool, see Specifying the Pool Properties. You can specify the following properties:

·        InitialSize – the initial number of instances which will be created in the pool

·        MaxSize – the maximum number of instances, which can exist in the pool.

Caution

Once this number of bean instances is reached (and there are no idle instances) and a request is received, the EJB Container will still create a new instance that serves the client request. This instance can later be removed easily if there are insufficient memory resources, for example. Therefore, consider the workload of your application(s) when determining the maximum size of the pool, but you do not need to be too precautious and set large values for this property.

·        ResizeStep – the number by which the total number of instances in the pool will be incremented each time a new instance is requested and there are no idle instances in the pool. The value of this element must be positive.

 

 

End of Content Area