Package javax.ejb

Examples of javax.ejb.SessionSynchronization.beforeCompletion()


         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


         try
         {
            // FIXME: This is a dirty hack to notify AS EJBTimerService about what's going on
            AllowedOperationsAssociation.pushInMethodFlag(AllowedOperationsAssociation.IN_BEFORE_COMPLETION);
           
            bean.beforeCompletion();
         }
         catch (RemoteException e)
         {
            throw new RuntimeException(e);
         }
View Full Code Here

         try
         {
            // FIXME: This is a dirty hack to notify AS EJBTimerService about what's going on
            AllowedOperationsAssociation.pushInMethodFlag(AllowedOperationsAssociation.IN_BEFORE_COMPLETION);
           
            bean.beforeCompletion();
         }
         catch (RemoteException e)
         {
            throw new RuntimeException(e);
         }
View Full Code Here

         try
         {
            // FIXME: This is a dirty hack to notify AS EJBTimerService about what's going on
            AllowedOperationsAssociation.pushInMethodFlag(AllowedOperationsAssociation.IN_BEFORE_COMPLETION);
           
            bean.beforeCompletion();
         }
         catch (RemoteException e)
         {
            throw new RuntimeException(e);
         }
View Full Code Here

      public void beforeCompletion()
      {
         SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
         try
         {
            bean.beforeCompletion();
         }
         catch (RemoteException e)
         {
            throw new RuntimeException(e);
         }
View Full Code Here

            // TODO: use interceptors to setup a context
            SessionInvocationContext invocation = new BaseSessionInvocationContext(null, null, null) {
               @Override
               public Object proceed() throws Exception
               {
                  bean.beforeCompletion();
                  return null;
               }
            };
            invocation.setEJBContext(ctx.getEJBContext());
            CurrentInvocationContext.push(invocation);
View Full Code Here

      public void beforeCompletion()
      {
         SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
         try
         {
            bean.beforeCompletion();
         }
         catch (RemoteException e)
         {
            throw new RuntimeException(e);
         }
View Full Code Here

            // TODO: use interceptors to setup a context
            SessionInvocationContext invocation = new BaseSessionInvocationContext(null, null, null) {
               @Override
               public Object proceed() throws Exception
               {
                  sync.beforeCompletion();
                  return null;
               }
            };
            invocation.setEJBContext(ctx.getEJBContext());
            CurrentInvocationContext.push(invocation);
View Full Code Here

      public void beforeCompletion()
      {
         SessionSynchronization bean = (SessionSynchronization) ctx.getInstance();
         try
         {
            bean.beforeCompletion();
         }
         catch (RemoteException e)
         {
            throw new RuntimeException(e);
         }
View Full Code Here

/*     */     public void beforeCompletion()
/*     */     {
/*  68 */       SessionSynchronization bean = (SessionSynchronization)this.ctx.getInstance();
/*     */       try
/*     */       {
/*  71 */         bean.beforeCompletion();
/*     */       }
/*     */       catch (RemoteException e)
/*     */       {
/*  75 */         throw new RuntimeException(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.