Kabir, Is it possible that the dynamic interceptor has specific granularity of FIELD only for example. Here is what I meant. I have this jboss-aop.xml setup for PojoCache:
| <prepare expr="field(* @org.jboss.cache.pojo.annotation.PojoCacheable->*)" /> | | <!-- Observer and Observable to monitor field modification --> | <bind pointcut=" | set(* @org.jboss.cache.pojo.annotation.PojoCacheable->*) | "> | <interceptor class="org.jboss.aspect.patterns.observable.SubjectInterceptor"/> | </bind> | | <introduction class="@org.jboss.cache.pojo.annotation.PojoCacheable"> | <mixin> | <interfaces>org.jboss.aspect.patterns.observable.Subject</interfaces> | <class>org.jboss.aspect.patterns.observable.SubjectImpl</class> | <construction>new org.jboss.aspect.patterns.observable.SubjectImpl(this)</construction> | </mixin> | </introduction> | So you see, I declare any @PojoCacheable POJO as "prepare" but I also introduce it with a Subject interface that has a "notifyObservers" api. Anyway, when I do this at runtime: | private void _attachInterceptor(Object pojo, InstanceAdvisor advisor, Interceptor cacheInterceptor, | Observer observer) | { | advisor.appendInterceptor(cacheInterceptor); | } | adding a CacheInterceptor dynamically (I just want to interceptor for FIELD access), what happens then is when notifyObservers get called, it will invoke the CacheInterceptor as well (as in MethodInvocation). In other words, appendInterceptor has the effect of adding nor just to FieldInvocation but also MethodInvocation. Is there anyway around it? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956455#3956455 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956455 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user