Package org.jboss.ejb3.stateful

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


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

         // FIXME: Ahem, stateful container invocation works on all.... (violating contract though)
         StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(info, id, null, null,
               (SessionSpecContainer) this);
         //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);

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

        
         /*
          * 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);
       
        
         /*
          * Invoke
          */

         return nextInvocation.invokeNext();

      }
      finally
      {
         invokedMethod.pop();
View Full Code Here

/*    */   }
/*    */
/*    */   public Object invoke(Invocation invocation) throws Throwable
/*    */   {
/* 50 */     log.debug("++++ LongLivedSessionPropagationInterceptor");
/* 51 */     StatefulContainerInvocation ejb = (StatefulContainerInvocation)invocation;
/* 52 */     StatefulBeanContext ctx = (StatefulBeanContext)ejb.getBeanContext();
/*    */
/* 54 */     Map extendedPCs = ctx.getExtendedPersistenceContexts();
/* 55 */     if ((extendedPCs == null) || (extendedPCs.size() == 0))
/*    */     {
/* 57 */       return invocation.invokeNext();
View Full Code Here

/*     */   }
/*     */
/*     */   public Object invoke(Invocation invocation)
/*     */     throws Throwable
/*     */   {
/*  57 */     StatefulContainerInvocation ejbInv = (StatefulContainerInvocation)invocation;
/*  58 */     StatefulBeanContext ctx = (StatefulBeanContext)ejbInv.getBeanContext();
/*  59 */     StatefulBeanContext root = ctx.getUltimateContainedIn();
/*     */
/*  62 */     boolean clustered = false;
/*  63 */     StatefulContainer container = (StatefulContainer)root.getContainer();
/*  64 */     ClusteredStatefulCache clusteredCache = null;
View Full Code Here

/* 374 */       if ((unadvisedMethod != null) && (isEJBObjectMethod(unadvisedMethod)))
/*     */       {
/* 376 */         localObject1 = invokeEJBObjectMethod(factory, id, info, args);
/*     */         return localObject1;
/*     */       }
/* 380 */       Object nextInvocation = new StatefulContainerInvocation(info, id);
/* 381 */       ((EJBContainerInvocation)nextInvocation).setAdvisor(this);
/* 382 */       ((EJBContainerInvocation)nextInvocation).setArguments(args);
/*     */
/* 385 */       nextInvocation = populateInvocation((EJBContainerInvocation)nextInvocation);
/*     */
View Full Code Here

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

         // FIXME: Ahem, stateful container invocation works on all.... (violating contract though)
         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);
         try
         {
            invokedMethod.push(new InvokedMethod(true, method));
            return nextInvocation.invokeNext();
         }
         finally
         {
            invokedMethod.pop();
         }
View Full Code Here

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

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

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

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

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

TOP

Related Classes of org.jboss.ejb3.stateful.StatefulContainerInvocation

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.