[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] LTW+cflow+after/arround advice

Read :

In line 47, i define an after advice.

 

Cordialement / Best regards

jeanlouis.pasturel@xxxxxxxxxxxxxxxxxx

 


De : aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] De la part de jeanlouis.pasturel@xxxxxxxxxxxxxxxxxx
Envoyé : jeudi 24 juillet 2008 08:43
À : aspectj-users@xxxxxxxxxxx
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:

 

[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

 

 

*********************************
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.
********************************