[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Re: Dynamically disable a pointcut
|
What do you mean by 'all methods are getting evaluated' - which
methods? If you can supply a complete simple test program showing
your concerns, that would be easier to discuss.
Andy
On 30 June 2010 08:46, rampaadh <rampaadh@xxxxxxxxxxx> wrote:
>
> Ashank,
>
> But if i disabled the boolean, still all methods got evaluated.
>
> For ex:
>
> In the following code, if isTraceEnabled = false, before() and after () did
> not get called, but still all methods are getting evaluated which is making
> my app very slow. If I disabled the flag, nothing should be evaluated from
> aspect right?
>
> pointcut traceMethods(): if (isTraceEnabled)
> && (execution(* *.*(..)) || execution(*.new(..)))
> && !within(*TraceAspect)
> && !execution(* *.*$*(..))
> && !within(Pointcuts.*);
>
> before() : traceMethods()
> {
> Signature sig = thisJoinPointStaticPart.getSignature();
> methodName = sig.getName();
> traceEntry(sig.getDeclaringTypeName() + "." + methodName +
> printParams(thisJoinPoint));
> }
>
> after() : traceMethods()
> {
> traceExit(thisJoinPointStaticPart.getSignature().toShortString());
> }
> --
> View this message in context: http://aspectj.2085585.n4.nabble.com/Dynamically-disable-a-pointcut-tp2272366p2272744.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>