The documentation for commons-pooling-1.6
defines GenericObjectPool
as:
GenericObjectPool
provides robust pooling functionality for arbitrary objects.
Furthermore, the Javadocs show a large number of fields that can be used to configure this pool.
The Javadocs also define StackObjectPool
as:
A simple, Stack-based ObjectPool implementation [that] places no limit on the number of "active" instances created by the pool, but is quite useful for re-using Objects without introducing artificial limits.
But I can't find any literature comparing these two pools against one another:
- What are the pros/cons for them both?
- When should one use
GenericObjectPool
overStackObjectPool
, and vice-versa?