Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: Advise proceed calls

One (general) use case would be to enable an aspect to advise a system that is
already being advised by another aspect. The general case would be to enable the
incremental addition of multiple aspects, in an incremental development scenario.

In the following technical report, two colleges and I touch on the topic, including
the advising of proceed calls:
http://ctp.di.fct.unl.pt/~mpm/Sobral_et_al_TR2006.pdf

I say "would be" because I think that, ultimately, it wouldn't work. AspectJ is too
asymmetrical a language for that. The language does not provide the proper means for
an aspect to compose with other aspects. Aspects generally assume they are the only
aspect that is advising a given system.

Miguel

-- 
Miguel P. Monteiro          | cell phone +351 96 700 35 45
Departamento de Informatica | Phone +351 21 294 8536 ext. 10708
Faculdade Ciencias e Tecnol.| Fax: +351 21 294 8541
Universidade Nova de Lisboa | URL: http://ctp.di.fct.unl.pt/~mpm
2829-516 Caparica, PORTUGAL | e-mail: mmonteiro [at] di fct unl pt


Em Qua, Maio 28, 2008 5:00 pm, aspectj-users-request@xxxxxxxxxxx escreveu:
> Date: Wed, 28 May 2008 16:31:34 +0200
> From: Simone Gianni <simoneg@xxxxxxxxxx>
> Subject: Re: [aspectj-users] Advise proceed calls
> To: Martin G?rg <aspectj-users@xxxxxxxxxxx>
> Message-ID: <483D6CC6.5040801@xxxxxxxxxx>
> Content-Type: text/plain; charset=UTF-8
>
> Hi Martin,
> I'm still relatively new to AspectJ, but I think there is no real use
> case for this. In fact, you should advice a method in a certain aspect
> (for example, create a session for transactional db, and close it
> afterward), and then advice the same method in another advice (for
> example to log the call), and then still in another aspect (for example
> to enforce the contract). This three advices will then be connected thru
> proceed() calls in the case they are all around advices, but whether
> they are around advice or pairs of before/after, and even the fact that
> it exists a proceed() keyword, is a matter of implementation of aspects
> and of AspectJ itself, so it would not be a good idea to have AspectJ
> match a proceed() call as a pointcut, it would be very fragile.
>
> But again, this is just "my humble opinion", let's see what AspectJ
> gurus say :)
>
> Simone
>
> Martin Görg wrote:
>> Hi,
>>
>> I suddenly ran into the question whether proceed() calls can be
>> advised, too. So I tested it and it seems, not. So, now I'm
>> thinking: Isn't there a possible use case for this? Like, I want to
>> print a debug message for whenever a proceed is called.
>>
>> Has there already been a discussion about this?
>>
>> Cheers
>> Martin
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 28 May 2008 11:00:58 -0400
> From: "Ramnivas Laddad" <ramnivas@xxxxxxxxxxxxxxx>
> Subject: Re: [aspectj-users] Type patterns in "within" with class
> 	qualifiers
> To: aspectj-users@xxxxxxxxxxx
> Message-ID:
> 	<ef9c6b3b0805280800q50a0363ese4b1ed2a2b15bd22@xxxxxxxxxxxxxx>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I don't think there is any reason. It may be just due to lack of good use
> case to justify adding this feature.
>
> -Ramnivas
>
> On Wed, May 28, 2008 at 9:09 AM, Eric Bodden <eric.bodden@xxxxxxxxxxxxxx>
> wrote:
>
>> 2008/5/16 Ramnivas Laddad <ramnivas@xxxxxxxxxxxxxxx>:
>> > Type patterns are not allowed to be qualified with modifiers in any
>> > pointcut, not just within().
>>
>> Interesting. Is there a reason for this?
>>
>> Eric
>> --
>> Eric Bodden
>> Sable Research Group
>> McGill University, Montréal, Canada
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> https://dev.eclipse.org/mailman/private/aspectj-users/attachments/20080528/f5eedc85/attachment.html
>
> ------------------------------
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> End of aspectj-users Digest, Vol 39, Issue 29
> *********************************************




Back to the top