activeldap/activeldap — pull request #77 by nappa (2013-12-03 08:45:14+00:00)
Title: fix problems on JNDI (retry on read timeout, exception handling)

Hi, I've experienced some troubles with JRuby in the production environment which I maintain.

Here's a brief patch for it.

Description:
* rescue from javax.naming.ServiceUnavailableException and treat it as retry-able error.
* rescue from javax.naming.NamingException with "LDAP response read timed out" and treat it as timeout error.
* populate ``timeout`` value in ldap.yml to JNDI's ``InitialLdapContext``. without this, timeout never happens.
* make retry works correctly on timeout situation.

I’ve tested with JRuby 1.7.6 + JRE 7u45 on Mac OS X and runinng it on JRuby 1.7.4 + JRE 7.25 on RHEL 6.

Hope it helps.