commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scherger, Derek" <>
Subject Pooling prepared statements with dbcp/pool packaegs
Date Wed, 24 Mar 2004 15:39:37 GMT
To help me understand the dbcp/pool packages I'm trying to get a unit test
going that shows that the underlying statements are actually being pooled
with dbcp but so far it looks like they are not.

To enable statement caching PoolableConnectionFactory wants a
KeyedObjectPoolFactory (which is an interface) in the constructor. Two
classes implement this interface, GenericKeyedObjectPoolFactor and

GenericKeyedObjectPoolFactory wants a KeyedPoolableObjectFactory in its
constructor, which is another interface with one *abstract* implementation
BaseKeyedPoolableObjectFactory. Do I need my on concrete implementation of
this class to ultimately use GenericKeyedObjectPoolFactory? This would seem
rather strange, or does it just indicate that this aspect of the dbcp/pool
packages is not yet complete?

StackKeyedObjectPoolFactory also wants a KeyedPoolableObjectFactory in many
(but not all) of its constructors so I'm blocked from using most of them too
unless I have my own implementation of KeyedPoolableObjectFactory.

I'm off to try one of the StackKeyedObjectPoolFactory constructors that
seems to be available but any help/advice/information on the above would be
most appreciated.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message