But if you take a look at the javadocs for BasicDataSource in
Commons-DBCP, you'll find the DBCP implementation of the DataSource
interface does not support the getConnection( user, password ) method.
http://commons.apache.org/dbcp/apidocs/index.html
--David
Amitava Chakraborty wrote:
Hi ALL,
I am using
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build pwi32dev-20060511
(SR2))
IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32
j9vmwi3223-2006050
4 (JIT enabled)
J9VM - 20060501_06428_lHdSMR
JIT - 20060428_1800_r8
GC - 20060501_AA)
JCL - 20060511a
Tomcat 5.5.21
DataBase : Informix V 11.10 Informix JDBC Driver 3.10 JC1
During connecting through JNDI datasource , db.getConnection() is working
perfectly. But db.getConnection("myusername", "myPassword") is not working.
It is saying
java.lang.UnsupportedOperationException: Not supported by BasicDataSource
org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:899)
But I checked the
http://java.sun.com/j2se/1.5.0
/docs/api/javax/sql/DataSource.html#getConnection(java.lang.String,%20java.lang.String)
where it is saying getconnection method with username and password is
supported. I am using javax.sql.DataSource. I donot want to use my username
and password in the context.xml or server.xml for security issue. Please
help me how can I do it.
Thanks
Amitava
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]