Skip to main content

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

Ramnivas,

Thank you, for your clarification.

 

Cordialement / Best regards

 

Jean-Louis Pasturel
jeanlouis.pasturel@xxxxxxxxxxxxxxxxxx

 


De : aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] De la part de Ramnivas Laddad
Envoyé : jeudi 24 juillet 2008 17:21
À : aspectj-users@xxxxxxxxxxx
Objet : Re: [aspectj-users] LTW+cflow+after/arround advice

 

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, <jeanlouis.pasturel@xxxxxxxxxxxxxxxxxx> wrote:

Read :

In line 47, i define an after advice.

 

Cordialement / Best regards


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


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

 

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

Back to the top