Home | Releases
 
OVERVIEW
Introduction
Features
Why InfraRED?
InfraRED Roadmap
Support
History
DOCUMENTATION
User Guide
Install
Configure
Application Diagnostics
Troubleshoot
Aspectwerkz
References
Javadocs
Screen Shots
Try InfraRED
Brochure
Performance Results
RESOURCES
The License
3rd Party Licenses
Commons
JUnit
Log4j 1.2.6
Struts
P6Spy
AspectJ
JSP Tree
POI 2.5.1
Castor 0.9.5.3
Instrumentation using Aspectwerkz

<<Previous | Next>>

The application that needs to be monitored can be instrumented using Aspectwerkz. In contrast to AspectJ which uses compile time weaving to add the aspects, Aspectwekz can use load time weaving. This means that the weaving of the application that was required when using AspectJ is not required. The steps required for preparing an application for monitoring using AspectWerkz is described below.

  1. Download the latest release of Aspectwerkz

    Unzip the jar file into some directory, say $ASPECT_HOME Make the following changes to the start up script of your application server

  2. Add a variable in the script to point to the aspectwerkz home directory $ASPECT_HOME set ASPECTWERKZ_HOME=$ASPECT_HOME

  3. Replace %JAVA_HOME%\bin\java with %ASPECTWERKZ_HOME%\bin\aspectwerkz.bat to start the application server. Use the Ant task with the instrument property set to false. This will not instrument the application but will add the required servlet filters and application lifecycle listeners.

  4. The file $INFRARED_Home/setup/aop.xml should be made available as a resource META-INF/aop.xml. For web application, copying the file $INFRARED_Home/setup/aop.xml to WEB-INF/classes/META-INF suffices. For EAR applications, this is appserver dependant. For Weblogic, copying the file $INFRARED_Home/setup/aop.xml to APP-INF/classes/META-INF suffices.

  5. Aspectwerkz will instrument all classes that are visible from the classloader that loaded aop.xml.

    In the case of web applications, this means that all web application classes in WEB-INF/classes and all libraries in WEB-INF/lib will be instrumented.

    In the case of EAR applications, all classes and libraries in all modules of the EAR will be instrumented.

    Often you don't want all libraries to be instrumented; for this, the exclusion property must be set in aop.xml. The aop.xml that ships with InfraRED excludes InfraRED libs from instrumentation.

    More details on this are available here and here

SourceForge.net Logo
About Us | Site Map | Privacy Policy | Contact Us © Tavant Technologies, Inc. All rights reserved.