CVS: plexus-container-new project.xml,1.7,1.8
[email protected] Sun, 25 May 2003 15:57:01 -0500
| Newsgroups | gmane.comp.java.plexus.devel |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/plexus/plexus-container-new
In directory eng.werken.com:/tmp/cvs-serv2742
Modified Files:
project.xml
Log Message:
Adding an aspect that can be used to track down "component leaks". When
I built poolserver, I didn't realize that Summit was actually using some
components without ever releasing them. As a result, after a week, I
saw memory usage going through the roof.
Based on that experience, coupled with my desire to learn some AspectJ,
I thought this would be an ideal opportunity. To use the aspect:
- Build a plexus jar as follows: maven aspectj:compile jar:install
- Add the aspectj dependency to your project.xml file
- Run your project
Here is the type of output you will receive if you have no component
leaks (demo with a simple plexus command line application):
kaz@coco:~/work/src/simple/target$ java -jar simple-1.0-uber.jar
Hello World!
>> Non-Released Component Count: 0
On the other hand, if you have a leak, you will see the following:
kaz@coco:~/work/src/simple/target$ java -jar simple-1.0-uber.jar
Hello World!
>> Non-Released Component Count: 1
>>>> org.apache.plexus.examples.simple.DefaultHelloWorld@34a1fc
Index: project.xml
===================================================================
RCS file: /cvsroot/plexus/plexus-container-new/project.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- project.xml 23 May 2003 13:59:40 -0000 1.7
+++ project.xml 25 May 2003 20:56:54 -0000 1.8
@@ -122,7 +122,14 @@
| Plexus Dependencies.
|
-->
-
+
+ <!-- AspectJ -->
+ <dependency>
+ <groupId>aspectj</groupId>
+ <artifactId>aspectjrt</artifactId>
+ <version>1.0.6</version>
+ </dependency>
+
<!-- PlexusTestCase -->
<dependency>
<groupId>junit</groupId>
@@ -158,6 +165,7 @@
<nagEmailAddress>[email protected]</nagEmailAddress>
<sourceDirectory>${basedir}/src/java</sourceDirectory>
+ <aspectSourceDirectory>${basedir}/src/aspect</aspectSourceDirectory>
<unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
<!-- Unit test classes -->