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:
[AppClassLoader@1554b97] 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)
[AppClassLoader@1554b97]
warning at org/objectweb/jonas/server/Bootstrap.java:98::0 Only before advice
is supported on handler join points (compiler limitation)
[AppClassLoader@1554b97]
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)
[AppClassLoader@1554b97]
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
jeanlouis.pasturel@xxxxxxxxxxxxxxxxxx