MaintainJ Blog

September 21, 2009

The location of aop.xml and how not to regenerate the file

Filed under: Uncategorized — maintainj @ 3:19 am

The aspect, which contains the instrumentation scope and options, is defined in aop.xml file. This file is always created under META-INF folder and META-INF/aop.xml is added to classpath. This file is required to instrument the application. The syntax of this file is pretty basic and once you understand the syntax, you can change it yourself for more fine grained instrumentation.

Different MaintainJ wizards place this file under different folders.

1. The MaintainJ.war shows the location of this file after Step 2: Configure Instrumentation Scope. 
2. The MaintainJSwingWizard.jar also shows the location of this file after the instrumentation scope step.
3. The J2SE, JUnit, Applet applications launched from Eclipse using the MaintainJ run configuration create a ‘maintainj’ folder under the main project and place META-INF/aop.xml under that folder.
4. The MaintainJ J2EE Server plugin for Tomcat and JBoss puts the file under TomcatRoot/maintainj and JBossRoot/bin/maintainj folders respectively.

Once you locate the file, you can change it manually. If you are using any of the Eclipse launch configurations, the aop.xml is regenerated everytime the appliaction or server is launched. So you need to select the ‘Do not regerate aop.xml’ checkbox at the bottom of the Aspect tab not to overwrite your changes.

If you are using MaintainJ.war or MaintainJSwingWizard.jar, the aop.xml is regenerated only if you repeat Step 2 to configure the instrumentation scope.

Choudary Kothapalli.


No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

You must be logged in to post a comment.

Powered by WordPress