Author: trang_vu
Date: 2011-08-11 05:34:12 -0400 (Thu, 11 Aug 2011)
New Revision: 4737
Added:
core/branches/2.3.x/patch/2.3.10/COR-237/readme.txt
Modified:
core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
Log:
COR-237: minConnection and maxConnection params in the LDAP configuration are not used.
Fix description
Use minConnection and maxConnection to set up com.sun.jndi.ldap.connect.pool.initsize and
com.sun.jndi.ldap.connect.pool.prefsize.
Modified:
core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java
===================================================================
---
core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2011-08-11
08:46:44 UTC (rev 4736)
+++
core/branches/2.3.x/exo.core.component.ldap/src/main/java/org/exoplatform/services/ldap/impl/LDAPServiceImpl.java 2011-08-11
09:34:12 UTC (rev 4737)
@@ -86,6 +86,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");
Added: core/branches/2.3.x/patch/2.3.10/COR-237/readme.txt
===================================================================
--- core/branches/2.3.x/patch/2.3.10/COR-237/readme.txt (rev 0)
+++ core/branches/2.3.x/patch/2.3.10/COR-237/readme.txt 2011-08-11 09:34:12 UTC (rev
4737)
@@ -0,0 +1,67 @@
+Summary
+
+ * Status: minConnection and maxConnection params in the ldap configuration are not
used
+ * CCP Issue: CCP-1032, Product Jira Issue: COR-237.
+ * Complexity: N/A
+
+The Proposal
+Problem description
+
+What is the problem to fix?
+
+ * minConnection and maxConnection params in the ldap configuration are not used
+
+Fix description
+
+How is the problem fixed?
+Use minConnection and maxConnection to set up com.sun.jndi.ldap.connect.pool.initsize and
com.sun.jndi.ldap.connect.pool.prefsize, precisely:
+ * com.sun.jndi.ldap.connect.pool.initsize and com.sun.jndi.ldap.connect.pool.prefsize
are set to minConnection if minConnection > 0
+ * com.sun.jndi.ldap.connect.pool.maxsize are set to maxConnection if maxConnection
> 0
+
+Patch file: COR-237.patch
+
+Tests to perform
+
+Reproduction test
+
+ * org.exoplatform.services.ldap.impl.LDAPServiceImpl does not use minConnection and
maxConnection params to init the ldap connection pool (should be used for
com.sun.jndi.ldap.connect.pool.initsize and com.sun.jndi.ldap.connect.pool.maxsize env
params).
+
+Tests performed at DevLevel
+*
+
+Tests performed at QA/Support Level
+*
+Documentation changes
+
+Documentation changes:
+* No
+
+Configuration changes
+
+Configuration changes:
+* No
+
+Will previous configuration continue to work?
+* Yes
+
+Risks and impacts
+
+Can this bug fix have any side effects on current client projects?
+
+ * Function or ClassName change: no
+
+Is there a performance risk/cost?
+* No
+
+Validation (PM/Support/QA)
+
+PM Comment
+
+ * Patch approved.
+
+Support Comment
+
+ * Patch validated on behalf of Support.
+
+QA Feedbacks
+*
Show replies by date