Folks,

can some one, or Rob, explain why this class is explicitly tied to the application class loader [1] when using the ServiceLoader? Is there any specific implication when the thread context class loader is used?

This makes it rather problematic using in a stacked class loader environment as Apache Tomcat [2]. I can neither put it in the webapp class path nor the common.loader class path although the caller is in common.loader. I have patched the class locally, recomplied OpenJDK 14 and it worked from both, application class loader and Tomcat's common.loader.

Can someone explain this?

Regards,

Michael

[1] https://github.com/AdoptOpenJDK/openjdk-jdk14u/blob/248c646c6e6c120b7d01acc99c8606ba53cf8d68/src/java.naming/share/classes/com/sun/jndi/ldap/LdapDnsProviderService.java#L54-L62
[2] https://www.mail-archive.com/users@tomcat.apache.org/msg134881.html

Reply via email to