Package org.jboss.aop

Examples of org.jboss.aop.MethodInfo


   @Deprecated
   protected MethodInfo getMethodInfo(Method method)
   {
      long hash = MethodHashing.calculateHash(method);
      MethodInfo info = getAdvisor().getMethodInfo(hash);
      if (info == null)
      {
         throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
      }
      return info;
View Full Code Here


      /*
       * Obtain the target method (advised)
       */
      Method actualMethod = method.toMethod(this.getClassloader());
      long hash = MethodHashing.calculateHash(actualMethod);
      MethodInfo info = getAdvisor().getMethodInfo(hash);
      if (info == null)
      {
         throw new RuntimeException("Method invocation via Proxy could not be found handled for EJB "
               + this.getEjbName() + " : " + method.toString()
               + ", probable error in virtual method registration w/ Advisor for the Container");
      }
      Method unadvisedMethod = info.getUnadvisedMethod();
      SerializableMethod unadvisedSerializableMethod = new SerializableMethod(unadvisedMethod);
     
      // Mark the start time
      long start = System.currentTimeMillis();

View Full Code Here

         return ia;
      }
     
      public MethodInfo getMethodInfo(Advisor advisor)
      {
         MethodInfo info = new MethodInfo(clazz, advisedHash, unadvisedHash, advisor);
         info.setInterceptors(interceptors);
         return info;
      }
View Full Code Here

         String args = "null";
        
         String name = null;
         if (isAdvised)
         {
            MethodInfo info = advisor.getMethodInfo(hash.longValue());
            Method originalMethod = info.getUnadvisedMethod();
            name = originalMethod.getName();
         }
         else
         {
            name = m.getName();
View Full Code Here

   }
  
   @Override
   public MethodInfo getMethodInfo(long hash)
   {
      MethodInfo info = (MethodInfo)methodInfos.get(hash);
      return info;
   }
View Full Code Here

         logger.trace("Received dynamic invocation for method with hash: " + methodHash);
      }

      // Get the Method via MethodInfo from the Advisor
      Advisor advisor = this.getAdvisor();
      MethodInfo methodInfo = advisor.getMethodInfo(methodHash);

      // create a container invocation
      AOPBasedContainerInvocation containerInvocation = new AOPBasedContainerInvocation(methodInfo,
            methodInvocation.getArguments());
      try
View Full Code Here

   public Object invoke(Serializable session, Class<?> invokedBusinessInterface, Method method, Object[] args)
         throws Exception
   {
      // create a (AOP) MethodInfo first so that a AOP based container invocation can be created out of it
      long hash = MethodHashing.calculateHash(method);
      MethodInfo methodInfo = getAdvisor().getMethodInfo(hash);
      if (methodInfo == null)
      {
         throw new RuntimeException("Method invocation via Proxy could not be found handled for EJB "
               + this.getEjbName() + " : " + method.toString()
               + ", probable error in virtual method registration w/ Advisor for the Container");
View Full Code Here

         throw new IllegalArgumentException(AOPBasedInterceptorRegistry.class + " can only handle "
               + org.jboss.ejb3.BeanContext.class + " , was passed " + targetBeanContext.getClass());
      }
      AOPBasedContainerInvocation aopInvocationContext = (AOPBasedContainerInvocation) containerInvocation;
      // form a AOP invocation
      MethodInfo methodInfo = aopInvocationContext.getMethodInfo();

      EJBContainerInvocation<AOPBasedSingletonContainer, LegacySingletonBeanContext> invocation = new SessionContainerInvocation<AOPBasedSingletonContainer, LegacySingletonBeanContext>(
            containerInvocation.getInvokedBusinessInterface(), aopInvocationContext.getMethodInfo());
      invocation.setAdvisor(methodInfo.getAdvisor());
      invocation.setArguments(containerInvocation.getArgs());
      // set the target bean context of the AOP invocation
      invocation.setBeanContext((org.jboss.ejb3.interceptors.container.BeanContext<?>) targetBeanContext);

     
View Full Code Here

      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
      pushEnc();
      try
      {
         long hash = MethodHashing.calculateHash(method);
         MethodInfo info = getAdvisor().getMethodInfo(hash);
         if (info == null)
         {
            throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
         }
         return invokeLocalHomeMethod(info, args);
View Full Code Here

      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
      pushEnc();
      try
      {
         long hash = MethodHashing.calculateHash(method);
         MethodInfo info = getAdvisor().getMethodInfo(hash);
         if (info == null)
         {
            throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
         }

         Method unadvisedMethod = info.getUnadvisedMethod();

         try
         {
            invokeStats.callIn();
View Full Code Here

TOP

Related Classes of org.jboss.aop.MethodInfo

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.