Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-15120] Kohsuke’s explanation of why preloadJar does not real…
…ly help.
  • Loading branch information
jglick committed Dec 7, 2012
1 parent 4dac121 commit 2b1ec8a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/hudson/remoting/Channel.java
Expand Up @@ -595,6 +595,13 @@ public void pinClassLoader(ClassLoader cl) {
* Classloading will consult the preloaded jars before performing
* network transfer of class files.
*
* <p><strong>Beware</strong> that this method is not useful in all configurations.
* If a {@link RemoteClassLoader} has another {@link RemoteClassLoader} as a
* {@linkplain ClassLoader#getParent parent}, which would be typical, then preloading
* a JAR in it will not reduce network round-trips: each class load still has to call
* {@link ClassLoader#loadClass(String, boolean) loadClass} on the parent, which will
* wind up checking the remote side just to get a negative answer.
*
* @param classLoaderRef
* This parameter is used to identify the remote classloader
* that will prefetch the specified jar files. That is, prefetching
Expand Down

0 comments on commit 2b1ec8a

Please sign in to comment.