The Generic Pool works in the following way:
- An application operation requests an object (an instance of a service)
from the pool.
- The Generic Pool checks to see if a free object exists inside the vector.
- If a free object exists, it passes the object to the application.
- If no free object exists, it creates an instance of the object and passes
it to the application.
- If no free object exists, and the pool is not designed for automatic growth,
it waits for the number of milliseconds specified in timeBetweenRetries and
then tries again to get a free object. If it is unsuccessful, it returns null.
- If it was successful in receiving the object, the application operation
uses the object and then releases it back to the pool so that it is available
for other operations.