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 !!!

Title: RE: [aspectj-users] Need some emergency Help with AspectJ PLEASE !!!

Mack
Could you use the logging package to combine output from the three projects. Define 3 aspects, and have each aspect send its output to a common logger using something like:

  Logger logger = LogManager.getLogManager().getLogger( "com.claims.myAspect" );
If necessary you can define your own log formatter to get the output to the text file in the form you want.
Just a thought

Elizabeth

-----Original Message-----
From: muneer yakub [mailto:muneer000@xxxxxxxxxxx]
Sent: October 6, 2003 11:28 AM
To: aspectj-users@xxxxxxxxxxx
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