-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
-
generic
-
generic
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.
- "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.
- relates to
-
JDK-4290486 thread creation needs to be inside doPrivileged to work with J2EE
-
- Resolved
-