> 
> > > 2. Jdbc2 driver implementation will supply a CPDS that should be used
> > > when pooling connections.  DBCP does not use this interface instead it
> > > pools the older style Connection objects.
> >
> > I'm not sure I follow you here.  If you've got a DataSource that pools the
> > connections, what's left for the "pool" package to do?  If your DataSource
> > doesn't pool connections, isn't Connection the right object to pool?
> >
> 
> Just out of curiousity, why is ConnectionPoolDataSource important to you?
> At the application level, for instance, J2EE applications deal in terms of
> javax.sql.DataSource implementations -- CPDS look like its only relevant
> if you want to build XADataSource things for distributed transactions.
> 

A CPDS and XADS are two different beasts.  Both are possible backends
for a DataSource.  In jdbc2 it is not "correct" to pool Connection
objects.  You are supposed to pool PooledConnections which are supplied
by the CPDS and both are implemented by the jdbc driver.  (you can also
write a pool that pools XAConnections provided by a XADS, but that is
something totally different.)  An application will not interact at all
with a PooledConnection object, they are only used by the pool to obtain
Connection objects which are passed to the app.

So the DBCP is not pooling the correct objects in a jdbc2 context. 
However, it is pooling PreparedStatements which is a good thing and not
included as part of PooledConnection in jdbc2.  PooledConnection objects
are supposed to have the necessary hooks to make pooling
PreparedStatements easier in jdbc3.  So according to Rod's comments
should I assume that DBCP will not be altered to work with a CPDS until
jdbc3 is finalized?  I think it should be possible to use wrappers
similar to how I interpret DBCP working now to implement
PreparedStatement pooling, though it would not necessarily follow the
spirit of the jdbc2 spec, that probably does not matter when a
significant efficiency can be had by bending the rules.

john mcnally

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to