Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8049539

Pooling LDAP connections doesn't work with custom socket factory

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 5.0-pool, 6-pool, 7-pool, 8-pool, 9
    • core-libs
    • None

      According to [1] LDAP connections can be pooled even if used with custom socket factories. Unfortunately it's not the way it works. As can be seen from [2] classnames of the factories are being passed to a comparator rather than factories themselves. That leads to a situation when at a runtime ClassCastException is silently swallowed and 'false' from the comparison is returned. And a custom compare() method is never executed. Thus connections are always treated as different and therefore never pooled.

      -------------------------------------------------
      [1] http://docs.oracle.com/javase/6/docs/technotes/guides/jndi/jndi-ldap.html#pooling
      [2] http://hg.openjdk.java.net/jdk6/jdk6/jdk/file/619655c4e72d/src/share/classes/com/sun/jndi/ldap/ClientId.java#l191

            aefimov Aleksej Efimov
            prappo Pavel Rappo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: