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, [EMAIL PROTECTED]
http://w3.hursley.ibm.com/~websterm/



Paul Freeman <[EMAIL PROTECTED]> 
Sent by: [EMAIL PROTECTED]
08/01/2007 14:43
Please respond to
[email protected]


To
[email protected]
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] [EMAIL PROTECTED] 
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] [EMAIL PROTECTED] 
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] [EMAIL PROTECTED] 
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] [EMAIL PROTECTED] 
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
[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