Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] RE: Re - Profiling Public Interface of an API

Hi Virgil,

Let me check my understanding. Do you have both WEB and API defined as
AspectJ projects in Eclipse? If clean and rebuild both projects, do you see
any annotations for advice on your code? How did you add API to the
aspectpath of WEB?

I would start by making sure you have everything configured correctly, then
work on making the pointcuts work properly once you know you are weaving
correctly. For example, what happens if you add these aspects to your API
project? To your WEB project? If you are weaving into WEB, you should see
warnings in your Eclipse problems view, and when you run, you should see
output when you first load classes and interfaces.

Also, if you turn on weaving messages in your AspectJ project properties,
what output do you see?

public aspect DebugIntegration1 {
    declare warning: staticinitialization(*): "staticinitalization";
}

public aspect DebugIntegration2 {
    before(): staticinitialization(*) {
        System.out.println("Entering "+thisJoinPointStaticPart);
    }
}

-----Original Message-----
From: aspectj-users-bounces@xxxxxxxxxxx
[mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Trasca Virgil
Sent: Monday, March 20, 2006 12:42 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] RE: Re - Profiling Public Interface of an API


   Hi Ron,

     sorry if I begin to be to insistent :-). 

I tried to write something like

pointcut whenAPIMethodIsCalled(): call (public *
APILink..* (..)) && !within(TestAPI); 

pointcut whenWEBMethodIsCalled(): call (public *
prmjspbean..* (..)) && !within(TestAPI); 
	
pointcut externalAPIMethodIsCalled() : 
whenAPIMethodIsCalled() &&
cflowbelow(whenWEBMethodIsCalled());

But this again resulted with 0 Join points.
I tried also the within like you said => 0 Join Points

 So I feel the problem is that my aj code is in
API(lib1) and I am weaving the WEB(lib2) with API in
aspectpath(like you said) but this is maybe not
enough. I need the aj code in the Web(lib2)? 
Or maybe is something related with loadtime weathing?
I am using iajc task from ant for using.

Thanks again,
Virgil


--- aspectj-users-request@xxxxxxxxxxx wrote:

> Send aspectj-users mailing list submissions to
> 	aspectj-users@xxxxxxxxxxx
> 
> To subscribe or unsubscribe via the World Wide Web,
> visit
> 
>
https://dev.eclipse.org/mailman/listinfo/aspectj-users
> or, via email, send a message with subject or body
> 'help' to
> 	aspectj-users-request@xxxxxxxxxxx
> 
> You can reach the person managing the list at
> 	aspectj-users-owner@xxxxxxxxxxx
> 
> When replying, please edit your Subject line so it
> is more specific
> than "Re: Contents of aspectj-users digest..."
> 
> 
> Today's Topics:
> 
>    1. RE: Re - Profiling Public Interface of an API
> (Ron Bodkin)
>    2. RE: Execution joinpoint and synchronization
> (Ron Bodkin)
> 
> 
>
----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 18 Mar 2006 10:26:57 -0800
> From: "Ron Bodkin" <rbodkin@xxxxxxxxxxxxxx>
> Subject: RE: [aspectj-users] Re - Profiling Public
> Interface of an API
> To: <aspectj-users@xxxxxxxxxxx>
> Message-ID: <006d01c64ab9$8b441d60$0202a8c0@Aqua>
> Content-Type: text/plain;	charset="us-ascii"
> 
> You need to put lib1 in the aspectpath of lib2 also,
> not just the classpath.
> The weaver only applies the effects of aspects in
> the aspectpath (when you
> build statically, e.g., in AJDT). In Eclipse, if you
> open the project
> properties, click on "AspectJ Aspect Path" to
> configure this...
> 
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx
> [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf
> Of Trasca Virgil
> Sent: Saturday, March 18, 2006 7:46 AM
> To: aspectj-users@xxxxxxxxxxx
> Subject: [aspectj-users] Re - Profiling Public
> Interface of an API
> 
> 
> 
>      Hi Ron,
> 
>         I think your aproach will work. But I tried
> it
> and I am not able to cathc any calls from lib2 to
> lib1. I think I am missing something.
> My code is:
> 
> pointcut whenAPIMethodIsCalled(): call (public *
> amdocs.APILink..* (..)) && !within(TestAPI); 
> 
> pointcut externalAPIMethodIsCalled() : 
> whenAPIMethodIsCalled() &&
> !within(amdocs.APILink..*)
> && within(amdocs.prmjspbean..*);
>     
>   APILink = lib1,prmjspbean=lib2. The AspectJ code
> is
> in lib1 for the moment and I will prefer to remain
> there as it will take me some time if I will have to
> move it to lib2.
> 
>    I am compiling with AspectJ both lib1 and lib2 in
> this order. In the classpath of lib2 I have lib1.
> What
> I am missing?
> 
> Thanks,
> Virgil
> 
> 
> 
> --- aspectj-users-request@xxxxxxxxxxx wrote:
> 
> > Send aspectj-users mailing list submissions to
> > 	aspectj-users@xxxxxxxxxxx
> > 
> > To subscribe or unsubscribe via the World Wide
> Web,
> > visit
> > 
> >
>
https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > or, via email, send a message with subject or body
> > 'help' to
> > 	aspectj-users-request@xxxxxxxxxxx
> > 
> > You can reach the person managing the list at
> > 	aspectj-users-owner@xxxxxxxxxxx
> > 
> > When replying, please edit your Subject line so it
> > is more specific
> > than "Re: Contents of aspectj-users digest..."
> > 
> > 
> > Today's Topics:
> > 
> >    1. cflowid generation and use (eight ball)
> >    2. RE: cflowid generation and use (Ron Bodkin)
> >    3. Profiling Public Interface of an API (Trasca
> > Virgil)
> >    4. RE: Profiling Public Interface of an API
> (Ron
> > Bodkin)
> >    5. Announcing AOP@Work Article: Next Steps With
> > Aspects (After
> >       Learning Advice) (Nick Lesiecki)
> >    6. Re: New AspectJ compiler is very slow under
> > AJDT (Andy Clement)
> > 
> > 
> >
>
----------------------------------------------------------------------
> > 
> > Message: 1
> > Date: Fri, 17 Mar 2006 18:50:01 +0000
> > From: "eight ball" <eight_ball_27@xxxxxxxxxxx>
> > Subject: [aspectj-users] cflowid generation and
> use
> > To: aspectj-users@xxxxxxxxxxx
> > Message-ID:
> > <BAY17-F1024C75CD35E737A499242BEE40@xxxxxxx>
> > Content-Type: text/plain; charset=iso-8859-1;
> > format=flowed
> > 
> > Hello all,
> > 
> > I'm working in a project that involves integrating
> > some legacy j2ee 
> > application into a larger system. It's a
> requirement
> > for this project (and 
> > for any project i would presume...) that logs
> should
> > provide traceability 
> > via some unique identifier common to all the calls
> > inside a call flow 
> > (containermanaged or not). The legacy part already
> > uses log4j for logging, 
> > as will the new parts.
> > 
> > I've been away (maybe for too long) from aspectJ,
> > and would appreciate if 
> > anyone could give me any hints on the ability of
> > aspectJ to weave both the 
> > initial generation of the unique cflow id in the
> > servlet layer and its use 
> > in all the log statements both in the new and
> (most
> > important) legacy 
> > components. This is, as stated above a J2EE
> > environment, containg both 
> > servlets, web service endpoints, ejbs and POJOs.
> > 
> > Any help would be higly appreciated.
> > Thanks.
> > 
> >
>
_________________________________________________________________
> > COPA 2006: Enfeite o seu MSN Messenger de verde e
> > amarelo! 
> > http://copa.br.msn.com/extra/emoticons/
> > 
> > 
> > 
> > ------------------------------
> > 
> > Message: 2
> > Date: Fri, 17 Mar 2006 11:36:43 -0800
> > From: "Ron Bodkin" <rbodkin@xxxxxxxxxxxxxx>
> > Subject: RE: [aspectj-users] cflowid generation
> and
> > use
> > To: <aspectj-users@xxxxxxxxxxx>
> > Message-ID: <014701c649fa$1f999b90$0202a8c0@Aqua>
> > Content-Type: text/plain;	charset="us-ascii"
> > 
> > Hi There,
> > 
> > Are you needing to weave distributed calls
> (between
> > processes/across VM's),
> > or just weave into different component types
> 
=== message truncated ===

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top