How can I turn off LDAP connection pooling in JIRA?
Programmatically, this is normally done in Java as follows:
Hashtable<String, String> env = new Hashtable<>();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://my.ldap.server:389");
env.put("com.sun.jndi.ldap.connect.pool", "false");
DirContext ctx = new InitialDirContext(env);
// use ctx to run LDAP queries
The important thing to note is that com.sun.jndi.ldap.connect.pool is not a VM argument. Ie launching the JVM with it passed in has no effect. With this in mind, how can I get JIRA to supply com.sun.jndi.ldap.connect.pool=false to the InitialDirContext constructor?
Thanks!