[exo-jcr-commits] exo-jcr SVN: r4462 - core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl.

do-not-reply at jboss.org do-not-reply at jboss.org
Tue May 31 10:29:00 EDT 2011


Author: areshetnyak
Date: 2011-05-31 10:28:59 -0400 (Tue, 31 May 2011)
New Revision: 4462

Modified:
   core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
EXOJCR-1366 : minConnection and maxConnection params in the ldap configuration was used

Modified: core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
--- core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java	2011-05-31 09:54:35 UTC (rev 4461)
+++ core/trunk/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java	2011-05-31 14:28:59 UTC (rev 4462)
@@ -87,6 +87,17 @@
       // TODO move it in configuration ?
       env.put("com.sun.jndi.ldap.connect.timeout", "60000");
 
+      if (config.getMinConnection() > 0)
+      {
+         env.put("com.sun.jndi.ldap.connect.pool.initsize", Integer.toString(config.getMinConnection()));
+         env.put("com.sun.jndi.ldap.connect.pool.prefsize", Integer.toString(config.getMinConnection()));
+      }
+
+      if (config.getMaxConnection() > 0)
+      {
+         env.put("com.sun.jndi.ldap.connect.pool.maxsize", Integer.toString(config.getMaxConnection()));
+      }
+
       env.put("com.sun.jndi.ldap.connect.pool", "true");
       env.put("java.naming.ldap.version", config.getVerion());
       env.put("java.naming.ldap.attributes.binary", "tokenGroups");



More information about the exo-jcr-commits mailing list