Package org.jboss.aop

Examples of org.jboss.aop.MethodInfo


         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();
      Interceptor[] aopInterceptors = aopInvocationContext.getInterceptors();

      EJBContainerInvocation<AOPBasedSingletonContainer, LegacySingletonBeanContext> invocation = new SessionContainerInvocation<AOPBasedSingletonContainer, LegacySingletonBeanContext>(
            containerInvocation.getInvokedBusinessInterface(), aopInvocationContext.getMethodInfo(), aopInterceptors,
            aopBasedSingletonContainer);
      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


      return jndiSuffix;
   }

   public Object localInvoke(Method method, Object[] args) throws Throwable
   {
      MethodInfo info = getMethodInfo(method);
      if (info == null)
      {
         throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
      }
      return localInvoke(info, args);
View Full Code Here

   {
      Object[] args = {timer};
      if(tMethod.getParameterTypes().length == 0)
         args = null;

      MethodInfo info = getMethodInfo(tMethod);
      if (info == null)
      {
         throw new RuntimeException("Could not find timeout method info: " + tMethod.toString() + " for container " + this);
      }
      // get hold of the unadvised method, so that we can mark it accessible
      // for the duration of this call (Remember, timeout methods can be with private, protected, package access modifier)
      Method unadvisedMethod = info.getUnadvisedMethod();
      // mark as accessible before invoking
      unadvisedMethod.setAccessible(true);
      try
      {
         // the timeout method (even if private, protected etc...) should pass through the AOP interceptor
         // chain. Hence we have a specific AOP interceptor stack for timeout method. Get hold of those interceptors
         Interceptor[] timeoutMethodAOPInterceptors = this.getInterceptors(info.getJoinpoint(),MDB_TIMEOUT_METHOD_AOP_INTERCEPTOR_STACK_NAME);
         // now create an invocation for the method info and the timeout method interceptors        
         EJBContainerInvocation nextInvocation = new MessageContainerInvocation(info, timeoutMethodAOPInterceptors);
         nextInvocation.setAdvisor(getAdvisor());
         nextInvocation.setArguments(args);
         nextInvocation.invokeNext();
View Full Code Here

      long start = System.currentTimeMillis();
     
      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
      try
      {
         MethodInfo info = getMethodInfo(method);
         Method unadvisedMethod = info.getUnadvisedMethod();

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

         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);
        
         try
         {
            invokeStats.callIn();
View Full Code Here

      try
      {
         AllowedOperationsAssociation.pushInMethodFlag(AllowedOperationsFlags.IN_EJB_TIMEOUT);

         // get the method info (AOP stuff)
         MethodInfo info = super.getMethodInfo(tMethod);
         // get hold of the unadvised method, so that we can mark it accessible
         // for the duration of this call (Remember, timeout methods can be with private, protected, package access modifier)
         Method unadvisedMethod = info.getUnadvisedMethod();
         // mark as accessible before invoking
         unadvisedMethod.setAccessible(true);

         try
         {
            // the timeout method (even if private, protected etc...) should pass through the AOP interceptor
            // chain. Hence we have a specific AOP interceptor stack for timeout method. Get hold of those interceptors
            Interceptor[] timeoutMethodAOPInterceptors = this.getInterceptors(info.getJoinpoint(),SLSB_TIMEOUT_METHOD_AOP_INTERCEPTOR_STACK_NAME);
            // now create an invocation for the method info and the timeout method interceptors
            EJBContainerInvocation nextInvocation = new SessionContainerInvocation(null, info,
                  timeoutMethodAOPInterceptors, this.getAsynchronousExecutor());
            nextInvocation.setAdvisor(getAdvisor());
            nextInvocation.setArguments(args);
View Full Code Here

      {
         invokeStats.callIn();

         Thread.currentThread().setContextClassLoader(classloader);
         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());
         }
         StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(info, null, null, this
View Full Code Here

      ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
      StatefulContainerInvocation newSi = null;

      MethodInvocation si = (MethodInvocation) invocation;
      MethodInfo info = getAdvisor().getMethodInfo(si.getMethodHash());
      Method method = info.getUnadvisedMethod();
      try
      {
         invokeStats.callIn();

         Thread.currentThread().setContextClassLoader(classloader);
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());
View Full Code Here

         /*
          * Obtain the target method (advised)
          */
         Method unadvisedMethod = method.toMethod(this.getClassloader());
         long hash = MethodHashing.calculateHash(unadvisedMethod);
         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");
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.