Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Re: LTW and perthis/pertarget question...

Thanks Matthew -

I am glad to know that this is a bug. I will try to develop a simple test case through which it can be reproduced. If I can I will open a bug report.

Thanks for your help. I will let you know (through a message post) what I come up with.

Paul


Matthew Webster wrote:

Paul,

I cannot reproduce your problem which seems to be a failure in the simple use of perthis() and LTW, Could you open a bug and post a simple failing testcase? Please also post the full verbose LTW log including AspectJ version information.

Cheers

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/


*Paul Freeman <PaulFreeman@xxxxxxxxxx>*
Sent by: aspectj-users-bounces@xxxxxxxxxxx

08/01/2007 17:49
Please respond to
aspectj-users@xxxxxxxxxxx


	
To
	aspectj-users@xxxxxxxxxxx
cc
	
Subject
	[aspectj-users] Re: LTW and perthis/pertarget question...


	





Hi Matthew -

The perthis clause is specified as perthis(login()) where login is the a
pointcut in the aspect LoginAspect that describes a method execution in
the class KronosLoginModule.  KronosLoginModule was present in the
application both during compile-time weaving and load-time weaving.

The information from the weaver seems to indicate that the
afterReturning advice was properly woven during load-time, however it
doesn't execute.  It will weave and execute under load-time weaving if I
remove the perthis clause in the aspect declaration.  And it will weave
and execute under compile-time weaving with the perthis clause included.

Thanks for responding.

Paul


Matthew Webster wrote:
 >
 > Paul,
 >
 > What is the class that you use in the perthis() clause? Is the class
 > part of the application that is being woven? Is this class woven when
 > you use compile-time weaving?
 >
 > Matthew Webster
 > AOSD Project
 > Java Technology Centre, MP146
 > IBM Hursley Park, Winchester,  SO21 2JN, England
 > Telephone: +44 196 2816139 (external) 246139 (internal)
 > Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
 > http://w3.hursley.ibm.com/~websterm/
 >
 >
 > *Paul Freeman <PaulFreeman@xxxxxxxxxx>*
 > Sent by: aspectj-users-bounces@xxxxxxxxxxx
 >
 > 08/01/2007 14:43
 > Please respond to
 > aspectj-users@xxxxxxxxxxx
 >
 >
> > To
 >                  aspectj-users@xxxxxxxxxxx
 > cc
> > Subject
 >                  [aspectj-users] LTW and perthis/pertarget question...
 >
 >
> >
 >
 >
 >
 >
 > Hi -
 >
 > I have a question regarding the use of perthis and/or pertarget with the
 > LTW and I was hoping someone might be able to help.  I have an Aspect
 > declared with perthis(<pointcut>).  When I weave the aspect during
 > compile time and run my program, the advice in this aspect is executed
 > properly.  When I compile my aspects and classes using javac and then
 > use the LTW to weave my aspects at runtime, the advice in the aspect
 > declared with perthis no longer executes properly.  The LTW emits info
 > messages stating that the advice was actually woven into the classes as
 > expected, but the advice never executes. If I remove the perthis
 > declaration and weave at runtime with the LTW, the advice will execute.
 >  Is this a bug?
 >
 > There is one difference in the output from the LTW, the 'weaveinfo'
 > statements for the advice that does not execute have the words [with
 > runtime test] at the end of the line when using perthis, and do not have
 > that statement when perthis is excluded.
 >
 > Any help or advice that anyone can offer would be greatly appreciated.
 > The weaveinfo output I am receiving for the two scenarios is appended to
 > the end of the message.
 >
 > Thanks,
 > Paul
 >
 > ------------------------------------------------------------------
 > No per*(pointcut) declaration in LoginAspect
 >
 > 2007-01-05 07:40:21,031 INFO  [STDOUT] [UnifiedClassLoader3@2c5b47]
 > weaveinfo Join point 'method-execution(boolean
> com.kronos.wfc.platform.security.business.authentication.login.KronosLoginModule.login())'
 >
 > in Type
> 'com.kronos.wfc.platform.security.business.authentication.login.KronosLoginModule'
 >
 > (KronosLoginModule.java:262) advised by afterReturning advice from
 > 'com.kronos.wfc.platform.aspects.tracing.session.LoginAspect'
 > (LoginAspect.java)
 >
 > 2007-01-05 07:40:21,031 INFO  [STDOUT] [UnifiedClassLoader3@2c5b47]
 > weaveinfo Join point 'method-execution(boolean
> com.kronos.wfc.platform.security.business.authentication.login.KronosLoginModule.login())'
 >
 > in Type
> 'com.kronos.wfc.platform.security.business.authentication.login.KronosLoginModule'
 >
 > (KronosLoginModule.java:262) advised by afterThrowing advice from
 > 'com.kronos.wfc.platform.aspects.tracing.session.LoginAspect'
 > (LoginAspect.java)
 >
 >
 > ------------------------------------------------------------------
 > perthis(pointcut) declaration in LoginAspect
 >
 >
 > 2007-01-05 07:59:19,937 INFO  [STDOUT] [UnifiedClassLoader3@96c949]
 > weaveinfo Join point 'method-execution(boolean
> com.kronos.wfc.platform.security.business.authentication.login.KronosLoginModule.login())'
 >
 >
 > in Type
> 'com.kronos.wfc.platform.security.business.authentication.login.KronosLoginModule'
 >
 > (KronosLoginModule.java:262) advised by afterReturning advice from
 > 'com.kronos.wfc.platform.aspects.tracing.session.LoginAspect'
 > (LoginAspect.java) [with runtime test]
 >
 > 2007-01-05 07:59:19,953 INFO  [STDOUT] [UnifiedClassLoader3@96c949]
 > weaveinfo Join point 'method-execution(boolean
> com.kronos.wfc.platform.security.business.authentication.login.KronosLoginModule.login())'
 >
 > in Type
> 'com.kronos.wfc.platform.security.business.authentication.login.KronosLoginModule'
 >
 > (KronosLoginModule.java:262) advised by afterThrowing advice from
 > 'com.kronos.wfc.platform.aspects.tracing.session.LoginAspect'
 > (LoginAspect.java) [with runtime test]
 >
 > _______________________________________________
 > aspectj-users mailing list
 > aspectj-users@xxxxxxxxxxx
 > https://dev.eclipse.org/mailman/listinfo/aspectj-users
 >
 >
 > ------------------------------------------------------------------------
 >
 > _______________________________________________
 > aspectj-users mailing list
 > aspectj-users@xxxxxxxxxxx
 > https://dev.eclipse.org/mailman/listinfo/aspectj-users

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


------------------------------------------------------------------------

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



Back to the top