Skip to main content

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

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
>   



Back to the top