Examples of afterBegin()


Examples of javax.ejb.SessionSynchronization.afterBegin()

            OperationState oldState = invocationContext.getFactory().getOperationState();
            invocationContext.getFactory().getOperationStateThreadLocal().set(OperationState.AFTER_BEGIN);

            // Call method
            try {
                bean.afterBegin();
            } catch (EJBException e) {
                throw e;
            } catch (RemoteException e) {
                throw new EJBException("Cannot call afterBegin method", e);
            } finally {
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

      Object target = invocation.getTargetObject();
      if(!(target instanceof SessionSynchronization))
         throw new IllegalArgumentException("target not an instance of SessionSynchronization " + target);
      SessionSynchronization synch = (SessionSynchronization) invocation.getTargetObject();
      // fake tx semantics
      synch.afterBegin();
      Object result = invocation.invokeNext();
      synch.beforeCompletion();
      synch.afterCompletion(true);
      return result;
   }
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

      }
      // Notify StatefulInstanceInterceptor that the synch will take care of the release.
      ctx.setTxSynchronized(true);
      SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
      // EJB 3 4.3.7 paragraph 2
      bean.afterBegin();
   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      StatefulContainerInvocation ejb = (StatefulContainerInvocation) invocation;
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

      }
      // Notify StatefulInstanceInterceptor that the synch will take care of the release.
      ctx.setTxSynchronized(true);
      SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
      // EJB 3 4.3.7 paragraph 2
      bean.afterBegin();
   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      StatefulContainerInvocation ejb = (StatefulContainerInvocation) invocation;
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

      }
      // Notify StatefulInstanceInterceptor that the synch will take care of the release.
      ctx.setTxSynchronized(true);
      SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
      // EJB 3 4.3.7 paragraph 2
      bean.afterBegin();
   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      StatefulContainerInvocation ejb = (StatefulContainerInvocation) invocation;
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

      if (tx.getStatus() == Status.STATUS_MARKED_ROLLBACK) return;
      SFSBSessionSynchronization synch = new SFSBSessionSynchronization(ctx);
      SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
      try
      {
         bean.afterBegin();
      }
      catch (EJBException e)
      {
         throw e;
      }
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

      }
      // Notify StatefulInstanceInterceptor that the synch will take care of the release.
      ctx.setTxSynchronized(true);
      SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
      // EJB 3 4.3.7 paragraph 2
      bean.afterBegin();
   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      StatefulContainerInvocation ejb = (StatefulContainerInvocation) invocation;
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

      }
      // Notify StatefulInstanceInterceptor that the synch will take care of the release.
      ctx.setTxSynchronized(true);
      SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
      // EJB 3 4.3.7 paragraph 2
      bean.afterBegin();
   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      StatefulContainerInvocation ejb = (StatefulContainerInvocation) invocation;
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

      }
      // Notify StatefulInstanceInterceptor that the synch will take care of the release.
      ctx.setTxSynchronized(true);
      SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
      // EJB 3 4.3.7 paragraph 2
      bean.afterBegin();
   }

   public Object invoke(Invocation invocation) throws Throwable
   {
      StatefulBeanContext<?> target = (StatefulBeanContext<?>) ContainerMethodInvocation.getContainerMethodInvocation(invocation).getBeanContext();
View Full Code Here

Examples of javax.ejb.SessionSynchronization.afterBegin()

/* 110 */     if (tx.getStatus() == 1) return;
/* 111 */     SFSBSessionSynchronization synch = new SFSBSessionSynchronization(ctx);
/* 112 */     SessionSynchronization bean = (SessionSynchronization)ctx.getInstance();
/*     */     try
/*     */     {
/* 115 */       bean.afterBegin();
/*     */     }
/*     */     catch (EJBException e)
/*     */     {
/* 119 */       throw e;
/*     */     }
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.