Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Integration of tracing aspect and Tomcat 5.5

Hi,

Setting up LTW may be the best way to approach. There isn't much Tomcat-specific setup involved, so that may be the reason for lack of examples.
Just to outline, all you need to do:
- Create and compile aspects that you need to weave.
- Create a jar file that includes
  -- the aspects
  -- an aop.xml file listing that aspect (see AspectJ guide for the syntax)
2. Add -javaagent:path/to/aspectjweaver.jar to Tomcat's command line. I add the following to startup.bat:
set ASPECTJ_WEAVING=-javaagent:%SPRING_HOME%\lib\aspectj\aspectjweaver.jar
set JAVA_OPTS=%ASPECTJ_WEAVING%

-Ramnivas

On Sat, Jun 7, 2008 at 11:57 AM, Jean-Louis.Pasturel <jean-louis.pasturel@xxxxxxxxx> wrote:
It is certainly better to look first the trace of verbose GC of the JVM or the heapdump/ javacore if the JVM crashes .
Tyler DeWitt a écrit :

Hello all,
  I'm new to AspectJ and Tomcat.  I'm working at a company that sells a product which runs Tomcat 5.5 and runs approximately 20 servlets.   I need to monitor cpu usage and memory usage of those servlets because they occasionally crash and we want to know what servlet is crashing (instead of just telling us that Tomcat is crashing).  I cannot recompile the servlets.   Is there a way that I could do load-time weaving on the servlets?  Another option would be to do load time weaving on Tomcat and then trace the threads (servlets) as they are created.  Is it possible to do load time weaving on Tomcat.  I've looked around, but so far have only run across outdated examples or examples that I don't get.

Thanks for the help!
Tyler


------------------------------------------------------------------------

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
 


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top