0 Replies Latest reply on May 1, 2005 11:16 PM by xxx xxx

    AspectManager.instance().removeBinding(..) problem

    xxx xxx Newbie

      Hello,

      I have a problem when I want to hot-undeploy an interceptor at runtime. The following code first deploys the LoggingInterceptor (this works fine) but when I want to undeploy the interceptor with AspectManager.instance().removeBinding("loggingBinding") nothing changes. Is something wrong with my code, or is it a bug in JBoss AOP?

      Thanks


      // LoggingAspect not activated here
      execute();
      
      System.out.println("--Activate Logging Interceptor--");
      AdviceBinding binding = new AdviceBinding("loggingBinding", "execution(public void SomeClass->someMethod())", null);
      binding.addInterceptor(LoggingInterceptor.class);
      AspectManager.instance().addBinding(binding);
      
      // LoggingAspect activated here
      execute();
      
      System.out.println("--Deactivate Logging Aspect--");
      AspectManager.instance().removeBinding("loggingBinding");
      // LoggingAspect should not be activated here, but it still is activated!
      execute();