On Tue, 11 Feb 2003, John Unwin wrote: > All the DBCP examples I have seen specify a single user id/password to create > connections. > > Is it possible to use connections based on an individual user's credentials? > > E.g. All our users are defined as a user to our database. Each can have different > (database) access credentials. We collect a user id and password from each user and > want to pass those to the database when a connection is made. Does this mean that the > connections cannot be reused (because the user/password will differ)?
Correct, all the current DBCP configurations assume the same uname/passwd combination within the pool. It should be possible to create a "keyed" pool that distinguishes between connections with different credentials, but that will take some development work. (If you just want a pool, not necessarily the JDBC-like DBCP, this is trivial using commons-pool directly). Alternatively, you could create distinct connection pools, one for each credential set. This is what I do to manage distinct credentials, but with only a handful of uname/passwd pairs. > > -- > John Unwin > [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]