Ramnivas, Thanks for the information. That was the step by step guide I needed. My new problem is that I have never been able to make the syntax of the -javaagent: work correctly (ie in aj5). I can call aj and the class gets LTW, but if I call aj5 with the same class file no weaving takes place. Is there a difference between the syntax for aj and aj5? Is the aop.xml different?
Thanks for the help! Tyler On Sun, Jun 8, 2008 at 4:12 PM, Ramnivas Laddad <[EMAIL PROTECTED]> wrote: > 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 < > [EMAIL PROTECTED]> 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@eclipse.org >>> https://dev.eclipse.org/mailman/listinfo/aspectj-users >>> >>> >> >> >> _______________________________________________ >> aspectj-users mailing list >> aspectj-users@eclipse.org >> https://dev.eclipse.org/mailman/listinfo/aspectj-users >> > > > _______________________________________________ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > >
_______________________________________________ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users