https://issues.apache.org/bugzilla/show_bug.cgi?id=53289
Priority: P2 Bug ID: 53289 Assignee: dev@tomcat.apache.org Summary: Clarify ResourceLink example that uses getConnection(username, password) Severity: enhancement Classification: Unclassified OS: Windows XP Reporter: knst.koli...@gmail.com Hardware: PC Status: NEW Version: 7.0.27 Component: Documentation Product: Tomcat 7 It was reported on the users list: http://marc.info/?t=133780532900005&r=1&w=2 http://markmail.org/thread/26yhdl7pfhdm2dic In documentation there is example [1] on using a ResourceLink with specific value for the factory, org.apache.naming.factory.DataSourceLinkFactory. It allows to specify custom username and password while reusing connections from a global datasource pool. This feature was added per bug 49543. The problem is that there is an important bit that is lacking from the description: this feature requires support from the pool implementation for getConnection(username, password) method. - In Apache Commons DBCP pool there is no support for that method [2]. An UnsupportedOperationException will be thrown. (DBCP 1.4) - In Apache Tomcat JDBC pool support for this feature is off by default (username and password are ignored). It can be enabled by setting alternateUsernameAllowed="true". [3] [1] http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Resource_Links [2] http://commons.apache.org/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html#getConnection%28java.lang.String,%20java.lang.String%29 [3] http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org