The present invention provides users and processes with various features
to control the memory usage by a cache and pool dynamically at runtime.
The cache and pool can be initialized on demand to remove idle objects of
classes from them without the server being restarted. When the cache and
pool reach their maximum sizes, idle objects in them may be removed to
make room for newly active objects using various strategies in batches,
where the schedule (periodicity), size and processing time of each batch
can be dynamically adjusted. When a newly created object is being added
to a full cache where each object is enrolled in a transaction, one or
more active objects may be passivated from the cache based on various
criteria to make room for the new instance to be added. Various features
of the cache and pool can be defined in a configuration file. This
description is not intended to be a complete description of, or limit the
scope of, the invention. Other features, aspects, and objects of the
invention can be obtained from a review of the specification, the
figures, and the claims.