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

Investigate customization of Thread creation in JNDI/LDAP internal classes

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • core-libs

      JNDI/LDAP provider uses platform threads for connection management. That includes the following classes:
      - "com.sun.jndi.ldap.Connection" - A thread that creates a connection to an LDAP server. After the connection is established, the thread reads from the connection. There is a 1-to-1 relationship between Connection and LdapClient.
      - "com.sun.jndi.ldap.EventQueue" - a dispatcher thread that dequeues and dispatches events from the event queue.
      - "com.sun.jndi.ldap.NamingEventNotifier" - maintains a thread to notify all listeners interested in the same
        "search" request.

      The usage of platform threads could be exhaustive in environments where a significant number of LDAP connections are required.
      A mechanism for specifying a thread factory for these classes could help to address this problem: that would allow using virtual threads as worker threads in the LDAP provider.
      That needs to be investigated once virtual threads are out of preview, i.e. can be used in the "java.naming" module.

            aefimov Aleksej Efimov
            aefimov Aleksej Efimov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: