[jboss-user] [JBoss AOP] - Re: The use of Hotswapping
do-not-reply at jboss.com
Tue Oct 28 16:18:03 EDT 2008
Well, if POJO is being intercepted by SimpleInterceptor, the jboss-aop.xml file is being loaded.
What do you mean with modifying SimpleInterceptor by InstanceInterceptor?
You can only modify something through the code, like below:
public static void main(String args) throws Exception
| // using SimpleInterceptor
| AdviceBinding binding = new AdviceBinding("execution(public * POJO->someMethod(..))", null);
| // check: SimpleInterceptor is being used
| // modifying binding, now I want to use InstanceInterceptor
| AdviceBinding newBinding = new AdviceBinding(binding.getName(), "execution(public * POJO->someMethod(..))", null);
| // check: Instanceinterceptor is now being used
At the moment that you use the name of the old binding in the new binding (at the line that calls the AdviceBinding constructor passing binding.getName() as parameter), you are replacing binding by newBinding. Consequently, you are replacing SimpleInterceptor by InstanceInterceptor.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185217#4185217
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185217
More information about the jboss-user