tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amitava Chakraborty <amita...@in.ibm.com>
Subject db.getConnection() working but db.getConnection("username","password") not working for JNDI Connection
Date Mon, 28 Jan 2008 06:23:00 GMT
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message