<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to ensure that the LDAP connection pool is used</title><link>https://answers.axonivy.com/questions/1209/how-to-ensure-that-the-ldap-connection-pool-is-used</link><description>&lt;p&gt;In the Admin UI we can enable connection pooling for ActiveDirectory. We enabled this pool as the connection setup to our AD is very slow and ivy Public API seems to call AD frequently. But it seems like the enabling of the pool doesn't speed up anything.&lt;/p&gt;
&lt;p&gt;How can we track and trace if the pool is working? &lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/ldapConnectionPoolOption.png"&gt;&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/1209/how-to-ensure-that-the-ldap-connection-pool-is-used" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 05 Mar 2015 12:56:08 -0500</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/1209/how-to-ensure-that-the-ldap-connection-pool-is-used/1210</link><description>&lt;p&gt;Unfortunately the connection pool that you activated is poorly configured by default and is therefore nearly pooling nothing. 
You can re-configure the pool behaviour by jvm system properties that are documented here: &lt;a href="http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html"&gt;http://docs.oracle.com/javase/jndi/tutorial/ldap/connect/config.html&lt;/a&gt; . &lt;br&gt;&lt;/p&gt;
&lt;p&gt;The Java System Properties can be set in &lt;a href="https://developer.axonivy.com/doc/latest/engine-guide/configuration/files/jvm-options.html"&gt;jvm.options file&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Note: Before 7.4 you need to this in the &lt;em&gt;.ilc file on windows and in &lt;/em&gt;.conf file for linux. See the &lt;a href="http://developer.axonivy.com/doc/latest/EngineGuideHtml/misc.html#misc.toolreference.ilc"&gt;engine guide&lt;/a&gt; for ILC reference.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can enable the jndi trace logging with the property &lt;br&gt;
&lt;strong&gt;-Dcom.sun.jndi.ldap.connect.pool.debug=all&lt;/strong&gt; 
&lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/ldapPool_createDebugMessage-evenWhenConnectionsAreAvailable.png"&gt;&lt;/li&gt;
&lt;li&gt;From a pool you might expect that it always re-used already created connections if they are idle. But this pool doesn't. To realy enable this feature i made good experiences by setting the property  &lt;br&gt;
&lt;strong&gt;-Dcom.sun.jndi.ldap.connect.pool.prefsize=-1&lt;/strong&gt; &lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/ldapPool_withNegativePrefSize-tryToReuseIdleConns2.png"&gt;&lt;/li&gt;
&lt;li&gt;Another reason why your pool might is not working is SSL. SSL connections are for security reasons not pooled by default. If the debug property is enabled you get a clear message with that info. However you can enable SSL connection pooling with the following option.  &lt;br&gt;&lt;strong&gt;-Dcom.sun.jndi.ldap.connect.pool.protocol=ssl&lt;/strong&gt; &lt;img alt="alt text" src="http://answers.axonivy.com/upfiles/ldapPool_disabledForSSL2.png"&gt;&lt;/li&gt;
&lt;/ul&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 05 Mar 2015 12:56:08 -0500</pubDate><guid>https://answers.axonivy.com/questions/1209/how-to-ensure-that-the-ldap-connection-pool-is-used/1210</guid></item></channel></rss>