You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Caldarale, Charles R" <Ch...@unisys.com> on 2008/01/28 14:05:31 UTC

RE: db.getConnection() working but db.getConnection("username","password") notworking for JNDI Connection

> From: Amitava Chakraborty [mailto:amitacha@in.ibm.com] 
> Subject: db.getConnection() working but 
> db.getConnection("username","password") notworking for JNDI Connection
> 
> I am using javax.sql.DataSource.

No, you're using the connections pooling logic, which wrappers
javax.sql.DataSource.  If you're going to use container-managed
connection pooling, the container must be aware of the database
credentials, not the webapp.

> I donot want to use my username and password in the context.xml
> or server.xml for security issue.

A misplaced concern.  If your Tomcat and webapp configuration files
aren't secure, then you have many other problems to worry about than
just database access.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
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