Skip to content

Commit fdaf7eb

Browse files
committed
Updated for Tomcat 6.0+
Issue: SPR-10788
1 parent 219eeb2 commit fdaf7eb

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

spring-instrument-tomcat/src/main/java/org/springframework/instrument/classloading/tomcat/TomcatInstrumentableClassLoader.java

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@
3030
* to loaded classes without the need to use a VM-wide agent.
3131
*
3232
* <p>To be registered using a
33-
* {@code <a href="http://tomcat.apache.org/tomcat-5.5-doc/config/loader.html">Loader</a>} tag
34-
* in Tomcat's {@code <a href="http://tomcat.apache.org/tomcat-5.5-doc/config/context.html">Context</a>}
33+
* {@code <a href="http://tomcat.apache.org/tomcat-6.0-doc/config/loader.html">Loader</a>} tag
34+
* in Tomcat's {@code <a href="http://tomcat.apache.org/tomcat-6.0-doc/config/context.html">Context</a>}
3535
* definition in the {@code server.xml} file, with the Spring-provided "spring-instrument-tomcat.jar"
36-
* file deployed into Tomcat's "server/lib" (for Tomcat 5.x) or "lib" (for Tomcat 6.x) directory.
37-
* The required configuration tag looks as follows:
36+
* file deployed into Tomcat's "lib" directory. The required configuration tag looks as follows:
3837
*
3938
* <pre class="code">&lt;Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/&gt;</pre>
4039
*
@@ -44,10 +43,7 @@
4443
* {@code getThrowawayClassLoader} methods mirror the corresponding methods
4544
* in the LoadTimeWeaver interface, as expected by ReflectiveLoadTimeWeaver.
4645
*
47-
* <p>See the PetClinic sample application for a full example of this
48-
* ClassLoader in action.
49-
*
50-
* <p><b>NOTE:</b> Requires Apache Tomcat version 5.0 or higher.
46+
* <p><b>NOTE:</b> Requires Apache Tomcat version 6.0 or higher, as of Spring 4.0.
5147
*
5248
* @author Costin Leau
5349
* @author Juergen Hoeller
@@ -103,7 +99,7 @@ public void addTransformer(ClassFileTransformer transformer) {
10399
*/
104100
public ClassLoader getThrowawayClassLoader() {
105101
WebappClassLoader tempLoader = new WebappClassLoader();
106-
// Use reflection to copy all the fields since most of them are private on pre-5.5 Tomcat.
102+
// Use reflection to copy all the fields since they are not exposed any other way.
107103
shallowCopyFieldState(this, tempLoader);
108104
return tempLoader;
109105
}

0 commit comments

Comments
 (0)