tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: A pool question
Date Fri, 01 Mar 2013 00:35:52 GMT
Hash: SHA256


On 2/28/13 4:25 PM, Christopher Schultz wrote:
> On 2/25/13 12:52 AM, Jukka Ruohonen wrote:
>> A question related to pools. Background: a big application in
>> which it is preferable to enforce different roles for different
>> databases and tables. This implies that there are different user
>> names and passwords for different connections. As I understand,
>> there are two options for connection pooling in a scheme like
>> this:
>> A. Create different resources for the different roles, each
>> having the user names and passwords defined as constants in the
>> Tomcat configuration files.
>> B. Group the different roles into a bigger scheme and use the 
>> option 'alternateUsernameAllowed' to obtain the connections with 
>> the specific user names and passwords.
> C. I believe that tomcat-pool (*not* the stock one based upon
> commons DBCP) supports the DataSource.getConnection(username,
> password) call and might even be smart enough to search-through
> existing connections for one that matches those credentials.
> This will allow you to have a single DataSource but still have 
> different credentials for your connection on-demand.

Sorry, I forgot to mention how this is different from (B): you can use
as many usernames and passwords as you'd like. The downside,
obviously, is that you might have a lot of turnover (i.e. thrashing)
in your connection pool. But if that's essentially what your
requirements are, there's nothing you can do to minimize that problem.

- -chris
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools -
Comment: Using GnuPG with Thunderbird -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message