Env:
JDK1.6
I have a hierarchy of object types as in
(Animal
(mammal
(dog)
(cat)
...
)
(oviparous
(..)
)
Since a large number of such animals may need to be instantiated,
I need to maintain a pool of "animals" of different species. I assume
that the KeyedObjectPool is the right pool for such an application.
Questions:
a) Is it generally recommended that I subclass GenericKeyedObjectPool
(to, say, AnimalObjectPool) and pool different types of animal objects in
there?
b) If I do (a), should I also subclass BaseKeyedPoolableObjectFactory (say,
AnimalObjectFactory)?
Is there a sample to demonstrate the usage of KeyedObjectPool? Are there any
common gotchas to watch out for?
Regards,
/U
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]