Examples of StatefulContainerInvocation


Examples of org.jboss.ejb3.cache.legacy.StatefulContainerInvocation

   public Object invoke(Invocation invocation) throws Throwable
   {
      // Find the ultimate parent context for the tree of SFSBs the target
      // bean is part of.  This "tree" could just be the bean itself, or
      // a multi-layer tree of nested SFSBs.
      StatefulContainerInvocation ejbInv = (StatefulContainerInvocation) invocation;
      StatefulBeanContext ctx = (StatefulBeanContext) ejbInv.getBeanContext();
      StatefulBeanContext root = ctx.getUltimateContainedIn();
     
      // Find out if the ultimate parent is clustered
      boolean clustered = false;
      StatefulContainer container = (StatefulContainer) root.getContainer();
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

         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);
         nextInvocation.setAdvisor(getAdvisor());
         nextInvocation.setArguments(args);

         nextInvocation = populateInvocation(nextInvocation);

         if (provider != null)
         {
            nextInvocation.getMetaData().addMetaData(AsynchronousInterceptor.ASYNCH, AsynchronousInterceptor.INVOKE_ASYNCH, "YES", PayloadKey.AS_IS);
            nextInvocation.getMetaData().addMetaData(AsynchronousInterceptor.ASYNCH, AsynchronousInterceptor.FUTURE_HOLDER, provider, PayloadKey.AS_IS);
         }
         return nextInvocation.invokeNext();
      }
      finally
      {
         if (method != null)
         {
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

   public InvocationResponse dynamicInvoke(Object target, Invocation invocation) throws Throwable
   {
      long start = System.currentTimeMillis();
     
      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);
        
         if (info == null)
         {
            throw new RuntimeException("Could not resolve beanClass method from proxy call");
         }
         newSi = new StatefulContainerInvocation(info,null);
         newSi.setArguments(si.getArguments());
         newSi.setMetaData(si.getMetaData());
         newSi.setAdvisor(getAdvisor());

         newSi = populateInvocation(newSi);

         Object rtn = null;
         try
         {
            rtn = newSi.invokeNext();
         }
         catch (Throwable throwable)
         {
            return marshallException(invocation, throwable, newSi.getResponseContextInfo());
         }
         InvocationResponse response = SessionContainer.marshallResponse(invocation, rtn, newSi.getResponseContextInfo());

         return response;
      }
      finally
      {
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

//         {
//            return invokeEJBObjectMethod(factory, id, info, args);
//         }

         // FIXME: Ahem, stateful container invocation works on all.... (violating contract though)
         StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(info, id);
         //StatefulSessionContainerMethodInvocation nextInvocation = new StatefulSessionContainerMethodInvocation(info,null);
         //EJBContainerInvocation nextInvocation = new StatefulContainerInvocation(info, id);
         nextInvocation.setAdvisor(getAdvisor());
         nextInvocation.setArguments(args);
        
         // allow a container to supplement information into an invocation
         nextInvocation = populateInvocation(nextInvocation);

         ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
         return nextInvocation.invokeNext();
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(oldLoader);
         popEnc();
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

         // FIXME: Ahem, stateful container invocation works on all.... (violating contract though)        
         /*
          * Build an invocation
          */

         StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(info, session,
               invokedBusinessInterface, this.getAsynchronousExecutor());
         nextInvocation.getMetaData().addMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION,
               SessionSpecRemotingMetadata.KEY_INVOKED_METHOD, method);
         nextInvocation.setArguments(args);

         /*
          * Invoke
          */

         return nextInvocation.invokeNext();

      }
      finally
      {
         /*
 
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

         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
               .getDeployment().getAsynchronousProcessor());
         nextInvocation.setAdvisor(getAdvisor());
         nextInvocation.setArguments(args);

         nextInvocation = populateInvocation(nextInvocation);

         return nextInvocation.invokeNext();
      }
      finally
      {
         if (method != null)
         {
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

   public InvocationResponse dynamicInvoke(Invocation invocation) throws Throwable
   {
      long start = System.currentTimeMillis();

      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);

         if (info == null)
         {
            throw new RuntimeException("Could not resolve beanClass method from proxy call");
         }
         newSi = new StatefulContainerInvocation(info, null, null, this.getDeployment().getAsynchronousProcessor());
         newSi.setArguments(si.getArguments());
         newSi.setMetaData(si.getMetaData());
         newSi.setAdvisor(getAdvisor());

         newSi = populateInvocation(newSi);

         Object rtn = null;
         try
         {
            rtn = newSi.invokeNext();
         }
         catch (Throwable throwable)
         {
            return marshallException(invocation, throwable, newSi.getResponseContextInfo());
         }
         InvocationResponse response = SessionContainer.marshallResponse(invocation, rtn, newSi
               .getResponseContextInfo());

         return response;
      }
      finally
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

//         {
//            return invokeEJBObjectMethod(factory, id, info, args);
//         }

         // FIXME: Ahem, stateful container invocation works on all.... (violating contract though)
         StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(info, id);
         //StatefulSessionContainerMethodInvocation nextInvocation = new StatefulSessionContainerMethodInvocation(info,null);
         //EJBContainerInvocation nextInvocation = new StatefulContainerInvocation(info, id);
         nextInvocation.setAdvisor(getAdvisor());
         nextInvocation.setArguments(args);
        
         // allow a container to supplement information into an invocation
         nextInvocation = populateInvocation(nextInvocation);

         ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
         return nextInvocation.invokeNext();
      }
      finally
      {
         Thread.currentThread().setContextClassLoader(oldLoader);
         popEnc();
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

        
         /*
          * Build an invocation
          */
        
         StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(info,sessionId);
         nextInvocation.getMetaData().addMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION,
               SessionSpecRemotingMetadata.KEY_INVOKED_METHOD, method);
         nextInvocation.setArguments(args);
        
        
         //nextInvocation.setAdvisor(getAdvisor());
         //nextInvocation.setSessionId(sessionId);
//         EJBContainerInvocation nextInvocation = new StatefulContainerInvocation(info, sessionId);
//         nextInvocation.setAdvisor(getAdvisor());
//         nextInvocation.setArguments(args);

         // allow a container to supplement information into an invocation
         //nextInvocation = populateInvocation(nextInvocation);

         //TODO Support Async Invocation
         //         ProxyUtils.addLocalAsynchronousInfo(nextInvocation, provider);
       
        
         try
         {
            /*
             * Invoke
             */
           
            invokedMethod.push(method);
            return nextInvocation.invokeNext();
         }
         finally
         {
            invokedMethod.pop();
         }
View Full Code Here

Examples of org.jboss.ejb3.stateful.StatefulContainerInvocation

         // FIXME: Ahem, stateful container invocation works on all.... (violating contract though)        
         /*
          * Build an invocation
          */

         StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(info, session,
               invokedBusinessInterface, this.getAsynchronousExecutor(), this);
         nextInvocation.getMetaData().addMetaData(SessionSpecRemotingMetadata.TAG_SESSION_INVOCATION,
               SessionSpecRemotingMetadata.KEY_INVOKED_METHOD, method);
         nextInvocation.setArguments(args);

         /*
          * Invoke
          */

         return nextInvocation.invokeNext();

      }
      finally
      {
         /*
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.