[jboss-user] [JBoss AOP] - Re: How to Hot Deploy a JBoss AOP application for dynamic pu

aquatr7 do-not-reply at jboss.com
Sat Oct 18 06:05:03 EDT 2008


Hello,
I found the example in folder "dynamic-aop". I used the standalone version of JBossAOP under Eclispe 3.2.1.  I tried to testify the dynamicity of the Hot Deployment, so I made this modifications in the code of the class "Driver":
 public class Driver
  | {
  |    public static void main(String[] args) throws Exception
  |    {
  | 	   for(int i=0;i<=100000;i++)
  | 	   {
  |                 execute();
  |             }
  | 
  |         execute();
  |     }
  | 
  |   // and I made the rest of the class Driver
  | }

I run the example like a jboss aop application (using the plugin). When running the loop "for" and before his termination, I added the following code after the loop "for" and before "execute();"
          AdviceBinding binding = new AdviceBinding("execution(POJO->new(..))", null);
  |          binding.addInterceptor(SimpleInterceptor.class);
  |          AspectManager.instance().addBinding(binding);

But there is not execution of the interceptor for the last "showing screen" after "execute();" and the console contain:
   anonymous wrote : --- new POJO(); ---
  | in empty constructor
  | --- adding instance interceptors ---
  | --- pojo.counter++; ---
  | <<< Entering Instancenterceptor for: POJO$counter_Get
  | <<< Entering Instancenterceptor for: POJO$counter_Set
  | --- pojo.someMethod(); ---
  | <<< Entering Instancenterceptor for: POJO$someMethod_2315001504750198986
  | in someMethod
  | 
  | like before adding the fragment of code for binding. Please tell me the reasons. I will be very grateful for your help.
  | Thanks.
  | 

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

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



More information about the jboss-user mailing list