tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cindy Ballreich <>
Subject Re: Connection Pooling Solution
Date Thu, 30 May 2002 20:21:10 GMT
At 03:43 PM 5/30/02 -0400, Rick Fincher wrote:
>Because the MySql driver is a javax.sql.DataSource and that's what gets
>passed back by the pool, making the pool transparent (no pun intended).
>That way you can later change the driver or the pooling details without
>changing your code (assuming the SQL dialect still works).

Thanks for replying Rick,

I may have run up against a gap in my java knowledge, but I don't understand your answer.
I guess I don't see how javax.sql.DataSource can get (and return) connections from the pool.
It doesn't seem like it would have the ability to do that. Isn't BasicDataSource just an implementation
of DataSource? Is DBCP pooling DataSources?? Am I completely clueless here?

Also, since the driver is being called from the resource factory (using BasicDataSourceFactory),
I'm not sure I understand why using BasicDataSource to get connections would affect the driver
at all?

Thanks again!


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

View raw message