You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by bu...@apache.org on 2016/12/13 20:40:51 UTC

svn commit: r1002749 - in /websites/staging/directory/trunk/content: ./ api/user-guide/2.1-connection-disconnection.html

Author: buildbot
Date: Tue Dec 13 20:40:51 2016
New Revision: 1002749

Log:
Staging update by buildbot for directory

Modified:
    websites/staging/directory/trunk/content/   (props changed)
    websites/staging/directory/trunk/content/api/user-guide/2.1-connection-disconnection.html

Propchange: websites/staging/directory/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Tue Dec 13 20:40:51 2016
@@ -1 +1 @@
-1774097
+1774099

Modified: websites/staging/directory/trunk/content/api/user-guide/2.1-connection-disconnection.html
==============================================================================
--- websites/staging/directory/trunk/content/api/user-guide/2.1-connection-disconnection.html (original)
+++ websites/staging/directory/trunk/content/api/user-guide/2.1-connection-disconnection.html Tue Dec 13 20:40:51 2016
@@ -258,7 +258,8 @@ h2:hover > .headerlink, h3:hover > .head
 <p>This will create a pool of connections that will be pre-authenticated.  If you do not setName and setCredentials, then the pool will contain unauthenticated connections.</p>
 <p>The DefaultPoolableLdapConnectionFactory is sufficient for many cases.  However, certain operations result in modifications to the connection itself.  For example, when the pool is created, a bind operation will occur with the credentials supplied as part of the config.  If you borrow a connection and perform a bind yourself, that would result in the connection being re-bound as a different user.  The next time that connection gets borrowed, things are likely to break.  If you perform any operation that results in a modification of the connection, you should instead use ValidatingPoolableLdapConnectionFactory:</p>
 <div class="codehilite"><pre><span class="o">...</span>
-<span class="n">PoolableLdapConnectionFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ValidatingPoolableLdapConnectionFactory</span><span class="o">(</span> <span class="n">config</span> <span class="o">);</span>
+<span class="n">LdapConnectionPool</span> <span class="n">pool</span> <span class="o">=</span> <span class="k">new</span> <span class="n">LdapConnectionPool</span><span class="o">(</span>
+    <span class="k">new</span> <span class="nf">ValidatingPoolableLdapConnectionFactory</span><span class="o">(</span> <span class="n">factory</span> <span class="o">),</span> <span class="n">poolConfig</span> <span class="o">)</span> <span class="o">);</span>
 <span class="o">...</span>
 </pre></div>