Package org.jboss.aop

Examples of org.jboss.aop.Advisor$DeployAnnotationOverrideAction


         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

            this.beanInstantiator = beanInstantiator;           
         }

      }

      Advisor advisor = getAdvisor();
      AdviceStack stack = advisor.getManager().getAdviceStack("InjectionCallbackStack");
      if(stack == null)
         throw new IllegalStateException("EJBTHREE-2020: No InjectionCallbackStack defined for domain " + domain + " of " + this);
      injectionCallbackStack = stack.createInterceptors(advisor, null);
     
   }
View Full Code Here

   {
      try
      {
         if(injectors == null)
            return;
         Advisor advisor = getAdvisor();
         InjectionInvocation invocation = new InjectionInvocation(beanContext, injectors, injectionCallbackStack);
         invocation.setAdvisor(advisor);
         invocation.setTargetObject(beanContext.getInstance());
         invocation.invokeNext();
      }
View Full Code Here

         // Get the method hash
         long methodHash = si.getMethodHash();
         log.debug("Received dynamic invocation for method with hash: " + methodHash);

         // Get the Method via MethodInfo from the Advisor
         Advisor advisor = this.getAdvisor();
         MethodInfo info = advisor.getMethodInfo(methodHash);
         Method unadvisedMethod = info.getMethod();
         SerializableMethod unadvisedMethodSerializable = new SerializableMethod(unadvisedMethod);
        
         // Get the invoked method from invocation metadata
         Object objInvokedMethod = si.getMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION,
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.