Package javax.transaction

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


      } 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

            for (Iterator iterator = syncMap.values().iterator(); iterator.hasNext();)
            {
                try
                {
                    synchronization = (Synchronization) iterator.next();
                    synchronization.beforeCompletion();
                }
                catch (Exception e)
                {
                    failures = true;
                    log.error("Unexpected error when perform Synchronization#beforeCompletion method" +
View Full Code Here

     */
    public void beforeCompletion() {
        int size = synchronizations.size();
        for (int i = 0; i < size; ++i) {
            Synchronization instance = (Synchronization) synchronizations.get(i);
            instance.beforeCompletion();
        }
    }
   
    /** This method will be called during transaction completion.  No resource
     * access is allowed.
View Full Code Here

    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

    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

      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

    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;
     
      try {
View Full Code Here

                } 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) {
                    status = Status.STATUS_MARKED_ROLLBACK;
                }
View Full Code Here

      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.