tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@unisys.com>
Subject RE: using a datasource connection pool resource with username and password supplied by user
Date Mon, 10 Oct 2005 03:26:20 GMT
> From: jeffery.s.eaton@transport.qld.gov.au 
> [mailto:jeffery.s.eaton@transport.qld.gov.au] 
> Subject: using a datasource connection pool resource with 
> username and password supplied by user
> 
> But what I really want to do is to get a database user and 
> password from the user and (after validating it) write this 
> to a session cookie.  Then when the user interacts with the 
> database (which is all the time) the username and password 
> will be extracted from the cookie and used in the following
> way:

I don't think you can do this with a connection pool.  The connections
in the pool are opened once only, and persist for the life of the
application, not the session.  Any user (session) can end up using any
of the connections, which is why you have to configure the credentials
with the ressource.  I think if you want to authenticate on each
session, you'll have to dispense with the pool and suffer the overhead
of opening a DB connection each time.

Perhaps someone else has a better idea...

 - 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 unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message