It is a known weaver limitation (there is a bug report with full details).

You will need to add something like: '&& execution(* *(..))' to your
pointcut to select method execution join points (and avoid selecting handler
join points). In any case, your description specifies that you need to
profile method execution so the change will match that while fixing the
problem you see.

-Ramnivas

On Thu, Jul 24, 2008 at 2:58 AM, <[EMAIL PROTECTED]>
wrote:

>  Read :
>
> In line 47, i define an after *advice*.
>
>
>
> Cordialement / Best regards
>
> [EMAIL PROTECTED]
>
>
>   ------------------------------
>
> *De :* [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] *De la part de*
> [EMAIL PROTECTED]
> *Envoyé :* jeudi 24 juillet 2008 08:43
> *À :* [email protected]
> *Objet :* [aspectj-users] LTW+cflow+after/arround advice
>
>
>
> Hi,
>
> I want to catch duration of a method and the duration of the methods in the
> cflow scope of this method.
>
> I use LTW weaving.
>
>
>
> I try it with two kinds of  strategiy for the advice :
>
> - around ( Aspect in issingleton PerClause)
>
> - before+after ( Aspect in percflow PerClause)
>
>
>
> The implementation of the aspect in *aop.xml* looks like this:
>
> <concrete-aspect
> name="iep.perf.aspects.abstractAspects.DurationSimpleMethodWithParentPercflow"
>
>
> extends="iep.perf.aspects.abstractAspects.AbstractDurationSimpleMethodWithParentPercflow"
> >
>
>                   <pointcut name="methods"
>
>                         expression="
>
>                         cflow(
>
>                         call(public *
> pcm.metier.refarticles.CmRefArticles.offreORTHorsCatalogue(..))
>
>                         || call (public *
> pcm.metier.refarticles.CmRefArticles.offreORTStandard(..))
>
>                         || call (public *
> pcm.metier.commande.CmRechercheBCR.lister(..))
>
>                         || call (public *
> pcm.metier.codeadv.CodeADV.searchByCodeADV(..))
>
>                         || call (public *
> pcm.metier.refarticles.CmRefArticles.listerModelesHorsCatal(..))
>
>                         )" />
>
>             </concrete-aspect>
>
>
>
>
>
> And I got this very explicit error:
>
>
>
> [EMAIL PROTECTED] warning at 
> iep/perf/aspects/abstractAspects/E:\eclipse\workspace\perfStats\src\iep\perf\aspects\abstractAspects\AbstractDurationSimpleMethodWithParentPercflow.aj:47::0
> Only before advice is supported on handler join points (compiler limitation)
>
> [EMAIL PROTECTED] warning at
> org/objectweb/jonas/server/Bootstrap.java:98::0 Only before advice is
> supported on handler join points (compiler limitation)
>
> [EMAIL PROTECTED] warning at
> iep/perf/aspects/abstractAspects/E:\eclipse\workspace\perfStats\src\iep\perf\aspects\abstractAspects\AbstractDurationSimpleMethodWithParentPercflow.aj:47::0
> Only before advice is supported on handler join points (compiler limitation)
>
> [EMAIL PROTECTED] warning at
> org/objectweb/jonas/server/Bootstrap.java:108::0 Only before advice is
> supported on handler join points (compiler limitation)
>
>
>
> In line 47 of the aspect, I define an after pointcut.
>
>
>
> I got the same error with the around advice.
>
>
>
> If my understanding is correct, it means that only before pointcut supports
> cflow pointcut. Am I right?
>
>
>
> With LTW, is there a workaround to track duration of method and duration of
> methods in the cfow scope of the first method?
>
>
>
> Cordialement / Best regards
>
>
>
> *Jean-Louis Pasturel*
>
> [EMAIL PROTECTED]
>
>
>
>
>  *********************************
> This message and any attachments (the "message") are confidential and
> intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered,
> changed or falsified.
> If you are not the intended addressee of this message, please cancel it
> immediately and inform the sender.
> ********************************
>  *********************************
> This message and any attachments (the "message") are confidential and
> intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered,
> changed or falsified.
> If you are not the intended addressee of this message, please cancel it
> immediately and inform the sender.
> ********************************
>
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to