Examples of beforeCompletion()


Examples of javax.transaction.Synchronization.beforeCompletion()

  private void notifyLocalSynchsBeforeTransactionCompletion() {
    if (synchronizations!=null) {
      for ( int i=0; i<synchronizations.size(); i++ ) {
        Synchronization sync = (Synchronization) synchronizations.get(i);
        try {
          sync.beforeCompletion();
        }
        catch (Throwable t) {
          log.error("exception calling user Synchronization", t);
        }
      }
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

  private void notifyLocalSynchsBeforeTransactionCompletion() {
    if (synchronizations!=null) {
      for ( int i=0; i<synchronizations.size(); i++ ) {
        Synchronization sync = (Synchronization) synchronizations.get(i);
        try {
          sync.beforeCompletion();
        }
        catch (Throwable t) {
          log.error("exception calling user Synchronization", t);
        }
      }
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

      Synchronization synchronization = flushSynch.get( session );
      if ( synchronization != null ) {
        //first cleanup
        flushSynch.remove( session );
        log.debug( "flush event causing index update out of transaction" );
        synchronization.beforeCompletion();
        synchronization.afterCompletion( Status.STATUS_COMMITTED );
      }
    }
  }
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

  private void notifyLocalSynchsBeforeTransactionCompletion() {
    if (synchronizations!=null) {
      for ( int i=0; i<synchronizations.size(); i++ ) {
        Synchronization sync = (Synchronization) synchronizations.get(i);
        try {
          sync.beforeCompletion();
        }
        catch (Throwable t) {
          log.error("exception calling user Synchronization", t);
        }
      }
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

  private void notifyLocalSynchsBeforeTransactionCompletion() {
    if (synchronizations!=null) {
      for ( int i=0; i<synchronizations.size(); i++ ) {
        Synchronization sync = (Synchronization) synchronizations.get(i);
        try {
          sync.beforeCompletion();
        }
        catch (Throwable t) {
          log.error("exception calling user Synchronization", t);
        }
      }
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

        interceptor.processInvocation(context);

        // commit
        for (Synchronization synchronization : synchronizations) {
            synchronization.beforeCompletion();
        }
        for (Synchronization synchronization : synchronizations) {
            synchronization.afterCompletion(Status.STATUS_COMMITTED);
        }
        synchronizations.clear();
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

      Synchronization synchronization = flushSynch.get( session );
      if ( synchronization != null ) {
        //first cleanup
        flushSynch.remove( session );
        log.debug( "flush event causing index update out of transaction" );
        synchronization.beforeCompletion();
        synchronization.afterCompletion( Status.STATUS_COMMITTED );
      }
    }
  }
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

                    return;
                }
                synch = (Synchronization) syncList.get(i++);
            }
            try {
                synch.beforeCompletion();
            } catch (Exception e) {
                log.warn("Unexpected exception from beforeCompletion; transaction will roll back", e);
                synchronized (this) {
                    status = Status.STATUS_MARKED_ROLLBACK;
                }
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

            // (This code is straight from bitronix)
            Iterator<?> iter = bt.getSynchronizationScheduler().reverseIterator();
            while (iter.hasNext()) {
                Synchronization synchronization = (Synchronization) iter.next();
                try {
                    synchronization.beforeCompletion();
                } catch (RuntimeException ex) {
                    bt.setStatus(Status.STATUS_MARKED_ROLLBACK);
                    throw ex;
                }
            }
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

      Synchronization synchronization = flushSynch.get( session );
      if ( synchronization != null ) {
        //first cleanup
        flushSynch.remove( session );
        log.debug( "flush event causing index update out of transaction" );
        synchronization.beforeCompletion();
        synchronization.afterCompletion( Status.STATUS_COMMITTED );
      }
    }
  }
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.