Examples of beforeCompletion()


Examples of javax.transaction.Synchronization.beforeCompletion()

    else {
      status = Status.STATUS_PREPARING;

      for ( int i = 0; i < synchronizations.size(); i++ ) {
        Synchronization s = ( Synchronization ) synchronizations.get( i );
        s.beforeCompletion();
      }

      status = Status.STATUS_COMMITTING;

      if ( connection != null ) {
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 );
    }
  }

  public SearchFactoryImplementor getSearchFactoryImplementor() {
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

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

Examples of javax.transaction.Synchronization.beforeCompletion()

      // env/06a2
      for (int i = 0; i < _interposedSynchronizations.size(); i++) {
        Synchronization sync = _interposedSynchronizations.get(i);

        try {
          sync.beforeCompletion();
        } catch (RuntimeException e) {
          setRollbackOnly(e);

          RollbackException newException = new RollbackException(e.toString());
          newException.initCause(e);
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

        if (log.isLoggable(Level.FINEST))
          log.finest(this + " beforeCompletion " + sync);

        try {
          sync.beforeCompletion();
        } catch (RuntimeException e) {
          setRollbackOnly(e);

          RollbackException newException = new RollbackException(e.toString());
          newException.initCause(e);
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

      } else {
         status = Status.STATUS_PREPARING;

         for (int i = 0; i < synchronizations.size(); i++) {
            Synchronization s = (Synchronization) synchronizations.get(i);
            s.beforeCompletion();
         }

         if (!runXaResourcePrepare()) {
            status = Status.STATUS_ROLLING_BACK;
         } else {
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

    else {
      status = Status.STATUS_PREPARING;

      for ( int i = 0; i < synchronizations.size(); i++ ) {
        Synchronization s = ( Synchronization ) synchronizations.get( i );
        s.beforeCompletion();
      }

      status = Status.STATUS_COMMITTING;

      if ( connection != null ) {
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

      } else {
         status = Status.STATUS_PREPARING;

         for (int i = 0; i < synchronizations.size(); i++) {
            Synchronization s = (Synchronization) synchronizations.get(i);
            s.beforeCompletion();
         }
        
         if (!runXaResourcePrepare()) {
            status = Status.STATUS_ROLLING_BACK;
         } else {
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

    else {
      status = Status.STATUS_PREPARING;

      for ( int i = 0; i < synchronizations.size(); i++ ) {
        Synchronization s = ( Synchronization ) synchronizations.get( i );
        s.beforeCompletion();
      }

      status = Status.STATUS_COMMITTING;

      if ( connection != null ) {
View Full Code Here

Examples of javax.transaction.Synchronization.beforeCompletion()

      });
    }

    Synchronization synchronization = transaction.getSynchronization();
    assertTrue("JTA synchronization registered", synchronization != null);
    synchronization.beforeCompletion();
    synchronization.afterCompletion(Status.STATUS_COMMITTED);

    assertTrue("Hasn't thread session", !TransactionSynchronizationManager.hasResource(sf));
    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());
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.