tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Lucia" <>
Subject RE: tomcat + postgres
Date Thu, 02 Feb 2006 00:00:56 GMT
Without knowing what book you refer to, and what class or interface
ConnectionPoolDataSource represents, it is difficult to know for sure.  

DataSource (javax.sql.DataSource) is an Interface, not a class.  Objects
returned from tomcat are sure to implement this interface, and are pooled
behind the scene, i.e., you do not care what the implementation class is.
So, I would recommend going with javax.sql.DataSource.

I.e., in context.xml, you say:

<Resource name="my/datasource/name" type="javax.sql.DataSource" 

And in your code, you expect the returned object to be a
javax.sql.DataSource (from the initial context, lookup, etc.)


-----Original Message-----
From: Matthew Whisenhunt [] 
Sent: Wednesday, February 01, 2006 4:06 PM
Subject: tomcat + postgres

I followed the howto about connection pooling at

and I had following question:

Do I use the DataSource class like in the example or the 
ConnectionPoolDataSource class (like it says to do in my book)?

Any insights would be very appreciated.

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

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

View raw message