-
Sub-task
-
Resolution: Delivered
-
P4
-
20
When running an application with a Java agent (e.g. `-javaagent:myagent.jar`) and a custom system class loader (e.g.
`-Djava.system.class.loader=MyClassLoader`), and the Java agent invokes the `Instrumentation.appendToSystemClassLoaderSearch` API to append to the class loader search, then the custom system class loader `appendToClassPathForInstrumentation` method will be invoked to add the JAR file to the custom system class loader's search path.
The JVM no longer synchronizes on the custom class loader while calling `appendToClassPathForInstrumentation`. The `appendToClassPathForInstrumentation` method in the custom class loader must add to the class search path in a thread-safe manner.
`-Djava.system.class.loader=MyClassLoader`), and the Java agent invokes the `Instrumentation.appendToSystemClassLoaderSearch` API to append to the class loader search, then the custom system class loader `appendToClassPathForInstrumentation` method will be invoked to add the JAR file to the custom system class loader's search path.
The JVM no longer synchronizes on the custom class loader while calling `appendToClassPathForInstrumentation`. The `appendToClassPathForInstrumentation` method in the custom class loader must add to the class search path in a thread-safe manner.