Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Need help with point cuts for subclasses

Hi All,

We've a simple aspect for publishing data to BAM and
it was all working fine. Originally, the point cut was
as below:

pointcut excluded() :
within(com.ist.espresso.aspects..*);

pointcut sendBamLog(EspressoXmlTxn txn) : target(txn) 
&& execution(*
com.ist.ruby.services.espresso.EspressoXmlTxn.process(..))
&& !excluded();


As part of making this code generic, we introduce a
class called ISTSFXml. This ISTSFXml class is an
abstract class which has an abstract method
process.We've re-written the aspect as below. 

pointcut excluded() :
within(com.apple.ist.istsf.aspects..*);

pointcut sendBamLog(ISTSFXmlTxn txn) : target(txn)  &&
execution(*
com.apple.ist.istsf.util.ISTSFXmlTxn.process(..)) &&
!excluded();


The idea is that any class that extends ISTSFXmlTxn
will implement the process method and the point cut
should be invoked for those subclasses. But i don't
see the pointcut getting called.


Could someone please let me know what's the mistake
i'm doing here?

Thanks for anyinput in advance,
Manjula

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Back to the top