Re: [aspectwerkz-user] Pre-advise results in recursion

Alexandre Vasseur <[email protected]>
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <[email protected]>
I think you should use cflow or cflowbelow

The syntax is something like

execution(* *.toString()) && ! cflowbelow(execution(* *.toString()))

cflow(..) and cflowbelow( ..)  accepts any pointcut in them, as long
as you don't bind formals with args(), this() or target()

You may read more about the differences between cflow and cflowbelow
in the AspectJ documentation that is more verbose than the AspectWerkz
one, as well as in Ramnivas book "AspectJ in action".
http://www.eclipse.org/aspectj/doc/progguide/language-joinPoints.html#d0e1334

Alex



On 4/26/05, Haimov, Gilad <[email protected]> wrote:
> Hi Jonas,
>  With your kind help, we have introduced pre-advise handlers to our system,
>  with which we automate our auditing.
>  However, the audit method internally loops-back and activates some of
>  those 'aspected' services, resulting in an infinite loop.
> 
>  Is there a way (XML flag?) to suppress entering of those services when
> called from within an executing aspect !
> 
>  That is: if a service is called (directly or indirectly) by an aspect - do
> not perform its own pre-advise
>  if a service is called by anything other than an aspect - perform its
> pre-advise.
> 
>  As always - thanks in advance for your assistance,
> 
> Gilad Haimov
> R&D, Application Servers, Gateways and Infrastructure
> [email protected]
> voice: 972-3-7664678
> bmcsoftware Visit: www.bmc.com
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.