java.lang.ObjectExtension of Tomcat's default class loader which adds instrumentation to loaded classes without the need to use a VM-wide agent.org.apache.catalina.loader.WebappClassLoader
org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader
To be registered using a Loader tag in Tomcat's Context
definition in the server.xml file, with the Spring-provided
"spring-tomcat-weaver.jar" file deployed into Tomcat's "server/lib" directory.
The required configuration tag looks as follows:
<Loader loaderClass="org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/>
Typically used in combination with a
org.springframework.instrument.classloading.ReflectiveLoadTimeWeaver
defined in the Spring application context. The addTransformer and
getThrowawayClassLoader methods mirror the corresponding methods
in the LoadTimeWeaver interface, as expected by ReflectiveLoadTimeWeaver.
See the PetClinic sample application for a full example of this ClassLoader in action.
NOTE: Requires Apache Tomcat version 5.0 or higher.
Costin - LeauJuergen - Hoeller2.0 - | Constructor: |
|---|
TomcatInstrumentableClassLoader using the
current context class loader. |
TomcatInstrumentableClassLoader with the
supplied class loader as parent.
|
| Method from org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader Summary: |
|---|
| addTransformer, findResourceInternal, getThrowawayClassLoader, toString |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.springframework.instrument.classloading.tomcat.TomcatInstrumentableClassLoader Detail: |
|---|
addTransformer method.
Typically called through ReflectiveLoadTimeWeaver. |
|
getThrowawayClassLoader method.
Typically called through ReflectiveLoadTimeWeaver. |
|