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:41:02 UTC
svn commit: r1342515 - in /tomcat/tc6.0.x/trunk: ./
webapps/docs/changelog.xml webapps/docs/config/context.xml
webapps/docs/jndi-resources-howto.xml
Author: kkolinko
Date: Fri May 25 06:41:02 2012
New Revision: 1342515
URL: http://svn.apache.org/viewvc?rev=1342515&view=rev
Log:
CTR: documentation
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=53289
Clarify ResourceLink example that uses getConnection(username, password)
Backport of r1342498 r1342503 from trunk.
Modified:
tomcat/tc6.0.x/trunk/ (props changed)
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml
tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml
Propchange: tomcat/tc6.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1342498,1342503
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=1342515&r1=1342514&r2=1342515&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Fri May 25 06:41:02 2012
@@ -179,6 +179,11 @@
docs.oracle.com site, instead of obsolete ones (download.oracle.com,
java.sun.com). (kkolinko)
</update>
+ <update>
+ <bug>53289</bug>: Clarify <code>ResourceLink</code> example that
+ uses DataSource.getConnection(username, password) method. Not all
+ data source implementations support it. (kkolinko)
+ </update>
</changelog>
</subsection>
<subsection name="Other">
Modified: tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml?rev=1342515&r1=1342514&r2=1342515&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/config/context.xml Fri May 25 06:41:02 2012
@@ -925,16 +925,27 @@
</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="http://tomcat.apache.org/tomcat-7.0-doc/jdbc-pool.html">Apache Tomcat JDBC pool</a>
+(included with Tomcat 7 and later) does support it,
+but by default this support is disabled and can be enabled by
+<code>alternateUsernameAllowed</code> attribute. See its documentation
+for details. The example below uses Apache Tomcat JDBC pool.</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>
Modified: tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml?rev=1342515&r1=1342514&r2=1342515&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/jndi-resources-howto.xml Fri May 25 06:41:02 2012
@@ -110,7 +110,7 @@ element:</p>
<li><a href="config/context.html#Resource Links"><ResourceLink></a> -
Add a link to a resource defined in the global JNDI context. Use resource
links to give a web application access to a resource defined in
- the<a href="config/globalresources.html"><GlobalNamingResources></a>
+ the <a href="config/globalresources.html"><GlobalNamingResources></a>
child element of the <a href="config/server.html"><Server></a>
element.</li>
<li><a href="config/context.html#Transaction"><Transaction></a> -
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org