From: twundke <nu...@jb...> - 2005-08-04 06:24:23
|
I'm using AOP with JBossCache (cache=1.2.3, AOP=1.3.1), and am having an issue with certain classes not being advised. Here is the interface/class hierarchy and xml file. package com.generic.code; | interface Base; | class BaseImpl implements Base; | | package com.my.code; | interface Sub extends Base; | class SubImpl extends BaseImpl implements Sub; <?xml version="1.0" encoding="UTF-8"?> | | <aop> | <prepare expr="field(* $instanceof{com.generic.code.Base}->*)" /> | </aop> So, what I would expect is that both BaseImpl and SubImpl would be advised (I'm using the aopc compiler rather than runtime instrumentation). However, I find that only BaseImpl is advised. Two solutions seem to exist; make SubImpl explicitly implement Base, or add the Sub interface to the AOP file. Neither of these is especially appealing in my situation. Are my expectations correct? The AOP reference documentation seems to imply that $instanceof works the same way as Java instanceof, which would mean that SubImpl really is an instance of Base, and hence should be advised. Is this a bug, or am I just doing something wrong? Tim. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3888356#3888356 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3888356 |