Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Need some emergency Help with AspectJ PLEASE !!!

Try compiling your aspect into a jar with ajc -outjar foo.jar ..., and then using this jar as an input to compiling your other projects with ajc -aspectpath foo.jar ...

Take a look at the online docs for more details on outjar and aspectpath

Ron Bodkin
Chief Technology Officer
New Aspects of Security
m: (415) 509-2895

> ------------Original Message-------------
> From: "muneer yakub" <muneer000@xxxxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Mon, Oct-6-2003 8:35 AM
> Subject: [aspectj-users] Need some emergency Help with AspectJ PLEASE !!!
> 
> I am working with three projects:
> 
> 1. Client (package structure : com.claims.client...)
> 2. Shared (package structure : com.claims.shared...)
> 3. Server (package structure : com.claims.server...)
> 
> The Client project has references to Shared and Server. I mean the Java 
> classes in client refer to the Java classes in Shared and Server. Now I have 
> an aspect called 'MyAspect' sitting in the Client project. This is what I am 
> trying to do with my aspect.
> I am trying to monitor all the java classes that are being called when I run 
> the system and I am writing the sequence of execution to a text file. So I 
> can use it later to generate a sequence diagram. So I have defined my Join 
> Point definition as follows:
> 
> pointcut allMethodsCut() : execution(* (com.claims.+).* (..));
> 
> Now I have this aspect sitting in my client project. When I am compiling 
> using the aspectJ compilier it applies the aspect only to the classes within 
> the Client project ('cuz the aspect is sitting in the client project). 
> Because of this it is only monitoring the classes within client project. I 
> also checked the modifications it does to the byte code. It is only 
> modifying the classes in the client project.
> 
> My question to you guys is : How can I apply the aspect 'MyAspect' to all 
> the project so whenever any of the classes in any of the projects get called 
> my aspect would know. Do I place the same aspect in all the three projects 
> and compile them ? I tried doing that and it errors out b'cuz I have the 
> aspect with the same name sitting in all the projects. Try using different 
> names ? I tried that too, the problem is I want to get the sequence of 
> execution in one text file. When I have three aspects with different names 
> then they will be writing to a different text file and I can't really merge 
> them properly b'cuz my projects are so big that I am better off without an 
> aspect. How can I use one aspect for all the three projects ?
> 
> PLEASE PLEASE HELP ME !!
> ITS VERY IMPORTANT TO ME!!
> 
> thanks a bunch,
> Mack
> 
> _________________________________________________________________
> Help protect your PC.  Get a FREE computer virus scan online from McAfee. 
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users
> 
> 


Back to the top