On 3/28/06, Peter Steijn <[EMAIL PROTECTED]> wrote:
>
> >
> > I haven't dug into Dbcp code but I think the GenericObjectPool is deep
> > within Dbcp as an internal data structure and I'd be surprised if it
> > let you specify a specific pool implementation.
>
>
> Does anyone else think that this should be different?
>
> Suggestion: The next version of DBCP should allow you to specify your own
> implementation in a configuration file.  I know that I was looking around
> for this feature when I first was exploring DBCP and POOL.


It's been a couple of years since I looked in detail, but IIRC the only
place that DBCP locks down the choice of the pool implementation is when you
select a specific *implementation* of DataSource (such as
org.apache.commons.dbcp.BasicDataSource).  If you assemble your own from
scratch, you're free to do whatever you want as you build up the stack.

Adding plugability inside something like BasicDataSource strikes me as an
excellent way to hand a developer a loaded gun, aimed at their foot.  The
code in a given implementation is going to naturally make assumptions about
the underlying pool implementation being used (such as what configuration
parameters it accepts) -- if you want a different DBCP implementation, it's
really easy to assemble your own.

-Pete
>
>
Craig

Reply via email to