commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fumo, Vince" <>
Subject DBCP and the ConnectionPoolDataSource Interface
Date Fri, 20 Feb 2004 21:17:52 GMT
I have three different databases I need to manage and I want to use
connection pooling datasources registered in JNDI as their commonality in my
application. From what I can gather, if the JDBC driver from the db vendor
has a DataSource implementation that implements ConnectionPoolDataSource, I
can easily register it in JNDI. It's also my understanding that the
management of the pool itself is not the responsibility of the individual
JDBC driver. I'm hoping that DBCP can handle my management. 

What I'd like to implement is a simple method  that will take a
ConnectionPoolDataSource object, wrap it in pool management and return a
PoolingDataSource object that I can then register in JNDI. 

I've looked at the Dialog in the javadoc and I understand how to create a
pool given a connection string (using the DriverConnectionFactory) but I'm
not sure how to replace this ConnectionFactory with the
ConnectionPoolDataSource object. I'm not even sure if this is what I should
be doing.

I'm sorry if this seems a simple question, but I've looked everywhere and I
can't seem to find anything that references a connection between
ConnectionPoolDataSource and DBCP (other than the reference in the javadoc
for DriverAdapterCPDS.

Thanks for your help.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message