Package org.jboss.aop

Examples of org.jboss.aop.Advisor$DeployAnnotationOverrideAction


      it = root.advisors.entrySet().iterator();
      while (it.hasNext())
      {
         Map.Entry entry = (Map.Entry) it.next();
         String classname = (String) entry.getKey();
         Advisor advisor = (Advisor) entry.getValue();
         nodes.add(createTreeNode(
                 classname, // name
                 "Class " + classname, // description
                 "images/serviceset.gif", // Icon URL
                 null,
View Full Code Here


         assertEquals(2, vm.constructorCalled);
         assertEquals(2, vm.methodCalled);
         assertEquals(2, vm.fieldRead);
         assertEquals(2, vm.fieldWrite);

         Advisor advisor = ((Advised) pojo)._getAdvisor();
         perClass = (AspectPerClass) advisor.getPerClassAspect("org.jboss.test.aop.jdk15annotated.AspectPerClass");
         System.out.println("POJO perClass stats: " + perClass.constructorCalled + " " + perClass.methodCalled + " " + perClass.fieldRead + " " + perClass.fieldWrite);
         assertEquals(1, perClass.constructorCalled);
         assertEquals(1, perClass.methodCalled);
         assertEquals(1, perClass.fieldRead);
         assertEquals(1, perClass.fieldWrite);

         advisor = ((Advised) pojo2)._getAdvisor();
         perClass2 = (AspectPerClass) advisor.getPerClassAspect("org.jboss.test.aop.jdk15annotated.AspectPerClass");
         System.out.println("POJO2 perClass stats: " + perClass.constructorCalled + " " + perClass.methodCalled + " " + perClass.fieldRead + " " + perClass.fieldWrite);
         assertEquals(1, perClass2.constructorCalled);
         assertEquals(1, perClass2.methodCalled);
         assertEquals(1, perClass2.fieldRead);
         assertEquals(1, perClass2.fieldWrite);
View Full Code Here

      System.out.println("***** testPrepare() ****");
      PreparePOJO pojo = new PreparePOJO();
      pojo.someMethod();

      Advised advised = (Advised)pojo;
      Advisor advisor = advised._getAdvisor();
   }
View Full Code Here

      System.out.println("***** testPrepareAtClassLevel() ****");
      PreparedPOJO pojo = new PreparedPOJO();
      pojo.someMethod();

      Advised advised = (Advised)pojo;
      Advisor advisor = advised._getAdvisor();
   }
View Full Code Here

         assertEquals(2, vm.constructorCalled);
         assertEquals(2, vm.methodCalled);
         assertEquals(2, vm.fieldRead);
         assertEquals(2, vm.fieldWrite);

         Advisor advisor = ((Advised) pojo)._getAdvisor();
         perClass = (AspectPerClass) advisor.getPerClassAspect("org.jboss.test.aop.jdk15annotated.AspectPerClass");
         System.out.println("POJO perClass stats: " + perClass.constructorCalled + " " + perClass.methodCalled + " " + perClass.fieldRead + " " + perClass.fieldWrite);
         assertEquals(1, perClass.constructorCalled);
         assertEquals(1, perClass.methodCalled);
         assertEquals(1, perClass.fieldRead);
         assertEquals(1, perClass.fieldWrite);

         advisor = ((Advised) pojo2)._getAdvisor();
         perClass2 = (AspectPerClass) advisor.getPerClassAspect("org.jboss.test.aop.jdk15annotated.AspectPerClass");
         System.out.println("POJO2 perClass stats: " + perClass.constructorCalled + " " + perClass.methodCalled + " " + perClass.fieldRead + " " + perClass.fieldWrite);
         assertEquals(1, perClass2.constructorCalled);
         assertEquals(1, perClass2.methodCalled);
         assertEquals(1, perClass2.fieldRead);
         assertEquals(1, perClass2.fieldWrite);
View Full Code Here

        Object vm = AspectManager.instance().getPerVMAspect("org.jboss.test.aop.jdk15annotated.AspectPerVM");
        if(vm != null)
          throw new RuntimeException("AspectPerVm should not be available in this deployment.");
      
         POJO pojo = new POJO();
         Advisor advisor = ((Advised) pojo)._getAdvisor();
         throw new RuntimeException("POJO should not be advised in this deployment.");
       
      }
      catch(Exception expected)
      {
View Full Code Here

      System.out.println("***** testPrepare() ****");
      PreparePOJO pojo = new PreparePOJO();
      pojo.someMethod();

      Advised advised = (Advised)pojo;
      Advisor advisor = advised._getAdvisor();
   }
View Full Code Here

      System.out.println("***** testPrepareAtClassLevel() ****");
      PreparedPOJO pojo = new PreparedPOJO();
      pojo.someMethod();

      Advised advised = (Advised)pojo;
      Advisor advisor = advised._getAdvisor();
   }
View Full Code Here

   {
      try
      {
         if(injectors == null)
            return;
         Advisor advisor = getAdvisor();
         for (Injector injector : injectors)
         {
            InjectionInvocation invocation = new InjectionInvocation(beanContext, injector, currentInvocationStack);
            invocation.setAdvisor(advisor);
            invocation.setTargetObject(beanContext.getInstance());
View Full Code Here

            return;
         }
        
         // Do lifecycle callbacks
         List<Class<?>> lifecycleInterceptorClasses = beanContainer.getInterceptorRegistry().getLifecycleInterceptorClasses();
         Advisor advisor = getAdvisor();
         Interceptor interceptors[] = LifecycleCallbacks.createLifecycleCallbackInterceptors(advisor, lifecycleInterceptorClasses, beanContext, callbackAnnotationClass);
        
         Constructor<?> constructor = beanClass.getConstructor();
         Object initargs[] = null;
         ConstructionInvocation invocation = new ConstructionInvocation(interceptors, constructor, initargs);
View Full Code Here

TOP

Related Classes of org.jboss.aop.Advisor$DeployAnnotationOverrideAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.