The Generic Pool works in the following way:
- The service invoker requests an object (an instance of a service) from
the pool.
- The Generic Pool checks to see if a free object exists inside the Hashtable
or Vector.
- If a free object exists, the Generic Pool will pass the object to the
application.
- If no free object exists, Generic Pool will create an instance of the
object and pass the instance to the application.
- If no free object exists, and the pool is not designed for automatic growth,
it will wait for the number of milliseconds specified in timeBetweenRetries
and then try again to get a free object. If the retry is unsuccessful, the
Generic Pool will return null.
- If the Generic Pool was successful in receiving the object, the service
invoker uses the object and then releases it back to the pool so that the
object becomes available for other service invokers.