You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by gianny DAMOUR <gi...@hotmail.com> on 2003/09/08 16:47:47 UTC

JCA ConnectionPoolDataSource

Hello,


I am "working" on an implementation of a connection pool as described by the 
JDBC 3.0 specifications, section "Connection Pooling".

Basically, I have writen a DataSource which uses under the cover a pool of 
PooledConnection, created via a ConnectionPoolDataSource. The current 
implementation seems to be OK (I have done some basic tests with the 
OracleConnectionPoolDataSource), yet it uses Jakarta commons-pool as a 
foundation for the pooling facilities...

I know that Geronimo provides a basic pool implementation 
(SimpleInstancePool), however its features are superseded by 
org.apache.commons.pool.impl.GenericObjectPool.

Hence the following question: should one use commons-pool or enhance 
SimpleInstancePool?

Thanks,
Gianny

_________________________________________________________________
MSN Search, le moteur de recherche qui pense comme vous !  
http://search.msn.fr


Re: JCA ConnectionPoolDataSource

Posted by Bruce Snyder <fe...@frii.com>.
This one time, at band camp, gianny DAMOUR said:

gD>I am "working" on an implementation of a connection pool as described by the 
gD>JDBC 3.0 specifications, section "Connection Pooling".
gD>
gD>Basically, I have writen a DataSource which uses under the cover a pool of 
gD>PooledConnection, created via a ConnectionPoolDataSource. The current 
gD>implementation seems to be OK (I have done some basic tests with the 
gD>OracleConnectionPoolDataSource), yet it uses Jakarta commons-pool as a 
gD>foundation for the pooling facilities...
gD>
gD>I know that Geronimo provides a basic pool implementation 
gD>(SimpleInstancePool), however its features are superseded by 
gD>org.apache.commons.pool.impl.GenericObjectPool.
gD>
gD>Hence the following question: should one use commons-pool or enhance 
gD>SimpleInstancePool?

Gianny,

The J2EE 1.4 spec requires that a compliant JDBC driver meet the JDBC
3.0 spec. The JDBC 3.0 spec requires a compliant JDBC driver to provide a
connection pool implementation via the JDBC 3.0 API. So there may be no
need to provide a connection pool unless we're going to provide support
for drivers that are not JDBC 3.0 compliant.

If it is necessary to provide a pool, we should consider reusing
something already available at Apache rather than building our own
implementation. There's DBCP from Jakarta Commons that provides a pool of
java.sql.Connection objects and there's Pool also from Jakarta Commons
that is a generic object pooler. But first we need to determine if we
really need a connection pool.

It looks like Geir checked these two classes in, let's ask him his
intentions. Geir, can you provide us some insight on the need to the
InstancePool and SimpleInstancePool?

Bruce
-- 
perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project 
http://www.castor.org/

Apache Geronimo 
http://incubator.apache.org/projects/geronimo.html