On Jul 13, 2009, at 5:43 PM, Dan Becker wrote:
Ahh, true Kevan, I am omitting one other step that I normally do to
make this run on Apache Tomcat. Namely, this context.xml is placed
in the web app META-INF/context.xml, and the Spring JAR spring-
tomcat-weaver.jar is placed into $CATALINA_HOME/server/lib:
<Context path="/MyApp" reloadable="false">
<Loader
loaderClass
=
"org
.springframework
.instrument.classloading.tomcat.TomcatInstrumentableClassLoader"/>
</Context>
Thanks.
I've had success now in Geronimo with instrumenting the the system
class loader by setting JAVA_OPTS==-javaagent:%ASPECTJ_WEAVER%
(where ASPECTJ_WEAVER points to aspectjweaver-1.6.2.jar) before I
call geronimo.bat, but I would rather run the weaver as part of the
web app class loader rather than the system class loader. So is it
possible to do an instrumented web app class classloader using
context.xml or some other mechanism in Geronimo?
I don't see how. Not without some changes within Geronimo. Is it
important that this capability be restricted to only certain
application classloaders? And not all Geronimo classloaders (which is
what you get with javaagent)?
--kevan