[jboss-user] [JBossCache] - Re: Way to access JBoss PojoCache interceptor?

jason.greene@jboss.com do-not-reply at jboss.com
Thu Sep 27 22:18:58 EDT 2007


You can get the interceptor by getting the AOP instance advisor and calling getInterceptors() the removeInterceptor(), like so:


  | InstanceAdvisor advisor = ((Advised) result)._getInstanceAdvisor();
  | for (Interceptor interceptor: advisor.getInterceptors())
  |    if (interceptor instanceof CacheFieldInterceptor)
  |        advisor.removeInterceptor(interceptor.getName());
  | 

Have a look at the source to AdvisedPojoHandler.remove() to see how it is done in POJO Cache:
http://anonsvn.jboss.org/repos/jbosscache/pojo/trunk/src/main/java/org/jboss/cache/pojo/impl/AdvisedPojoHandler.java

-Jason


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4089537#4089537

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4089537



More information about the jboss-user mailing list