commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seva Popov" <>
Subject RE: getConnection() in Tomcat 5.5
Date Tue, 17 Jul 2007 17:48:55 GMT
By default Tomcat uses DBCP's BasicDataSource. The BasicDataSource does
not support getConnection(username,password). You need to use DBCP's
SharedPoolDataSource or PerUserPoolDataSource that do support it.

You can look at the examples here:

There's plenty of information in the JavaDoc as well:

Finally, you should pay attention on the fact that the DBCP that is
shipped with Tomcat is repackaged. So, you would need to use that
package name in your Tomcat configuration instead of the one found in
DBCP's examples and JavaDoc. 

-----Original Message-----
From: Parthasarathy M [] 
Sent: Tuesday, July 17, 2007 6:13 AM
Subject: getConnection() in Tomcat 5.5


Is there anyway to use getConnection(username,password) in Tomcat 5.5?
I was able to connect to DB using getConnection(), but when I use the
parameterized connection, i get a wierd UnsupportedOperationException.
Could somebody suggest me what can be done at the Tomcat end to get
this resolved?

Parthasarathy M

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

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

View raw message