Hi. I'm looking for a way to dynamically determine which username and password to use for a Tomcat JDBC Connection Pool [https://tomcat.apache.org/tomcat-8.0-doc/jdbc-pool.html] based on the database URL to which it is connecting. I imagine this as an external key=value lookup where (database URL)={username, password}.

However, I've not been able to set the user credentials programatically as I'd hoped via dataSource.getConnection(username, password) despite setting alternateUsernameAllowed="true" in the context.xml Resource element and leaving the username and password attributes blank. I also tried setting the auth attribute to "Application" instead of "Container", but that didn't make any difference. What would be the correct way of doing this? I'm also open to other suggestions.

Thank you,
Philip

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to