I use LTW on Tomcat. The Tomcat server can not startup
successfully. I want to know if anyone have used LTW on Tomcat or any special configuration
is required?
The following is the details.
A simple aspect used to trace the entry and exit of the
method invocation (use System.out to output). I use a simple Java class to test
it by LTW, it works.
I configure it on Tomcat 5.5.12, run on JDK 5.0. But the
tomcat can not start up completely.
The following is the output when no LTW used:
Oct 28, 2005 7:10:13 PM
org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Oct 28, 2005 7:10:14 PM org.apache.jk.common.ChannelSocket
init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Oct 28, 2005 7:10:14 PM org.apache.jk.server.JkMain
start
INFO: Jk running ID=0 time=0/60 config=null
Oct 28, 2005 7:10:14 PM
org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath
resource
Oct 28, 2005 7:10:14 PM
org.apache.catalina.startup.Catalina start
INFO: Server startup in 8192 ms
When use LTW, the output stopped at the second line,
that is
INFO: Starting Coyote HTTP/1.1 on http-8080
I remove my web application completely from the tomcat,
and restart tomcat using the same script as the above (keep using LTW), I got
the same result, i.e., tomcat stopped at the second line.
I use apsectj M4.
Thanks
Guofeng
AOP.xml:
<aspectj>
<aspects>
<aspect name="com.gf.tracing.TracingAspect"/>
</aspects>
<weaver options="-1.5 -warn:none">
<include within="com.mycompany..*"/>
</weaver>
</aspectj>
ASPECT
package com.gf.tracing;
public aspect TracingAspect {
pointcut
points():
!within(TracingAspect) && !within(TraceSupport) && call ( *
com. mycompany..*(..) ) ;
before(): points() {
System.out.println( thisJoinPoint.getSourceLocation() + " " +
thisJoinPoint.toShortString() ) ;
}
after(): points() {
System.out.println( thisJoinPoint.getSourceLocation() + " " +
thisJoinPoint.toShortString() ) ;
}
}