You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by kk...@apache.org on 2012/05/25 08:10:24 UTC
svn commit: r1342503 - /tomcat/trunk/webapps/docs/config/context.xml
Author: kkolinko
Date: Fri May 25 06:10:23 2012
New Revision: 1342503
URL: http://svn.apache.org/viewvc?rev=1342503&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53289
Clarify ResourceLink example that uses getConnection(username, password)
Modified:
tomcat/trunk/webapps/docs/config/context.xml
Modified: tomcat/trunk/webapps/docs/config/context.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/context.xml?rev=1342503&r1=1342502&r2=1342503&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/trunk/webapps/docs/config/context.xml Fri May 25 06:10:23 2012
@@ -1196,16 +1196,26 @@
</attribute>
</attributes>
- <p>Shared Data Source Example</p>
+ <p>Shared Data Source Example:</p>
+ <p><strong>Warning:</strong> This feature works only if the global DataSource
+supports <code>getConnection(username, password)</code> method.
+<a href="http://commons.apache.org/dbcp/">Apache Commons DBCP</a> pool that
+Tomcat uses by default does not support it. See its Javadoc for
+<code>BasicDataSource</code> class.
+<a href="../jdbc-pool.html">Apache Tomcat JDBC pool</a> does support it,
+but by default this support is disabled and can be enabled by
+<code>alternateUsernameAllowed</code> attribute. See its documentation
+for details.</p>
<source>
<GlobalNamingResources>
...
<Resource name="sharedDataSource"
global="sharedDataSource"
type="javax.sql.DataSource"
+ factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
+ alternateUsernameAllowed="true"
username="bar"
password="barpass"
-
...
...
</GlobalNamingResources>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org