Re: getConnection() in Tomcat 5.5

2007-07-19 Thread Parthasarathy M

Thanks Seva Popov,

This is an useful information.

I got this solved, by just modyfying the tomcat
naming-factory-dbcp.jar (modified to redirect the request for
getConnection(username,password) to getConnection())

Regards,
Parthasarathy M.

On 7/17/07, Seva Popov [EMAIL PROTECTED] wrote:

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:
http://wiki.apache.org/jakarta-commons/DBCP

There's plenty of information in the JavaDoc as well:
http://jakarta.apache.org/commons/dbcp/api-1.2.2/org/apache/commons/dbcp
/datasources/package-summary.html

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 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 17, 2007 6:13 AM
To: commons-user@jakarta.apache.org
Subject: getConnection() in Tomcat 5.5

Hi,

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?

Regards,
Parthasarathy M

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: getConnection() in Tomcat 5.5

2007-07-17 Thread Seva Popov
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:
http://wiki.apache.org/jakarta-commons/DBCP

There's plenty of information in the JavaDoc as well:
http://jakarta.apache.org/commons/dbcp/api-1.2.2/org/apache/commons/dbcp
/datasources/package-summary.html

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 [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 6:13 AM
To: commons-user@jakarta.apache.org
Subject: getConnection() in Tomcat 5.5

Hi,

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?

Regards,
Parthasarathy M

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]