Rolls back a transaction.
@throws Exception if the transaction is not active
502514
protected function rollback()
    {
        $transaction = array_pop($this->_transaction);
        if ($transaction && $transaction instanceof Transaction) {
            $transaction->rollBack();
        }
    }
58516
public function rollBack()
    {
        if ($this->transactionNestingLevel === 0) {
            throw ConnectionException::noActiveTransaction();
        }

        $connection = $this->getWrappedConnection();

        $logger = $this->_config->getSQLLogger();

        if ($this->transactionNestingLevel === 1) {
            if ($logger) {
                $logger->startQuery('"ROLLBACK"');
            }
            $this->transactionNestingLevel = 0;
            $connection->rollBack();
            $this->isRollbackOnly = false;
            if ($logger) {
                $logger->stopQuery();
            }

            if ($this->autoCommit === false) {
                $this->beginTransaction();
            }
        } elseif ($this->nestTransactionsWithSavepoints) {
            if ($logger) {
                $logger->startQuery('"ROLLBACK TO SAVEPOINT"');
            }
            $this->rollbackSavepoint($this->_getNestedTransactionSavePointName());
            --$this->transactionNestingLevel;
            if ($logger) {
                $logger->stopQuery();
            }
        } else {
            $this->isRollbackOnly = true;
            --$this->transactionNestingLevel;
        }
    }
1325485
public function rollback()
	{
		if( $this->openTransactions < 1 )
			throw new RuntimeException( 'Transaction not opened' );

		if( $this->openTransactions == 1 )
		{
			$this->execute( 'ROLLBACK' );
			if( self::$autoCommit )
				$this->execute( 'SET AUTOCOMMIT=1' );
		}
		$this->openTransactions--;
		return TRUE;
	}
765098
public function rollBack()
	{
		if($this->inTransaction == true)
		{
			throw new LikePDOException("There is no active transaction");
			return false;
		}
		else
		{
			if(!$this->driver->rollBackTransaction())
			{
				throw new LikePDOException("Failed to roll back transaction");
				return false;
			}
			
			return true;
		}
	}
943087
def rollback(self, transaction = None):
        """"""
        if not self.in_transaction:
            raise NotInTransaction
        for collection, store in self.stores.items():
            store.rollback()
            indexes = self.indexes[collection]
            indexes_to_rebuild = []
            for key, index in indexes.items():
                try:
                    index.rollback()
                except NotInTransaction:
                    # this index is "dirty" and needs to be rebuilt
                    # (probably it has been created within a transaction)
                    indexes_to_rebuild.append(key)
            if indexes_to_rebuild:
                self.rebuild_indexes(collection, indexes_to_rebuild)
        self.in_transaction = False
950804
public function rollback()
    {
        if (!$this->started) {
            throw new \RuntimeException('Cannot rollback transaction before start');
        }
        if (!$this->pdo->rollBack()) {
            throw new \RuntimeException('Failed to rollback transaction');
        }

        $this->started = false;
    }
1139702
protected <T> T executeIgnoreRollback(TransactionCallback<T> action, T rollbackValue) {
        try {
            // Try to create the mutex in a new TX
            return this.newTransactionTemplate.execute(action);
        } catch (TransactionSystemException e) {
            if (e.getCause() instanceof RollbackException) {
                // Ignore rollbacks
                return rollbackValue;
            }

            // re-throw exception with unhandled cause
            throw e;
        }
    }
886912
def reopen(self):
        
        try:
            self._con.reopen()
        except Exception:
            if self._transcation:
                self._transaction = False
                try:
                    self._con.query('rollback')
                except Exception:
                    pass
        else:
            self._transaction = False
            self._closed = False
            self._setsession()
            self._usage = 0
622349
public void rollback() throws SystemException {
        Transaction transaction = currentTransaction();
        if (transaction == null) {
            throw new IllegalStateException("No active transaction");
        }
        transaction.rollback();     
    }
1032644
public function rollback() {
		if (!$this->inTransaction()) {
			throw new Exception('There is no active transaction');
		}

		$res = @oci_rollback($this->_dbh);
		$this->checkError($res);

		$this->_inTransaction = false;
		$this->_commitMode = null;

		return $res;
	}
978927
public function rollBack()
    {
        $this->assertIsSupported($this->supportsTransactions, __METHOD__);
        $this->wrapped->getConnection()->rollBack();
    }
706038
@Override
	public void rollback() throws TransactionManagementException {
		logger.entering(CLASSNAME, "rollback");
		try {
			if (userTran.getStatus() != Status.STATUS_NO_TRANSACTION) {
				userTran.rollback();
			}
			logger.log(Level.FINE, "javax.transaction.Status: {0}", userTran.getStatus());
		} catch (IllegalStateException e) {
			throw new TransactionManagementException(e);
		} catch (SecurityException e) {
			throw new TransactionManagementException(e);
		} catch (SystemException e) {
			throw new TransactionManagementException(e);
		}
		logger.exiting(CLASSNAME, "rollback");
	}
794897
void rollbackTransaction() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "rollbackTransaction");

        try {
            if (rolledBackDueToConnectionFailure) { //PK60857
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    SibTr.debug(tc, "rolledBackDueToConnectionFailure = true");
                }
                // No-op'ing the rollback because it has already happened during the commit.
                // This means rollback should never have been called, but some components insist on calling rollback after getting a TransactionRolledBackException.
                return; // exit trace handled by the finally block
            }

            jcaSession.rollbackLocalTransaction();
            uncommittedReceiveCount = 0;
        } catch (javax.resource.spi.IllegalStateException ise) {
            // No FFDC code needed
            // d238447 FFDC review. IllegalState is thrown if the jcaSession is closed, which
            //   might occur in a badly coded app due to concurrent race. No FFDC.
            throw (javax.jms.IllegalStateException) JmsErrorUtils.newThrowable(javax.jms.IllegalStateException.class,
                                                                               "EXCEPTION_RECEIVED_CWSIA0053",
                                                                               new Object[] { ise, "JmsSessionImpl.rollbackTransaction (#1)" },
                                                                               ise,
                                                                               null, // null probeId = no FFDC
                                                                               this,
                                                                               tc
                            );
        } catch (javax.resource.spi.LocalTransactionException lte) {
            // No FFDC code needed
            // d222942 review - ok
            // d238447 FFDC review. LTE thrown when no transaction is in progress. JMS layer shouldn't
            //   get this, so generate FFDC to indicate something has gone wrong.
            throw (javax.jms.IllegalStateException) JmsErrorUtils.newThrowable(javax.jms.IllegalStateException.class,
                                                                               "EXCEPTION_RECEIVED_CWSIA0053",
                                                                               new Object[] { lte, "JmsSessionImpl.rollbackTransaction (#2)" },
                                                                               lte,
                                                                               "JmsSessionImpl.rollbackTransaction#2",
                                                                               this,
                                                                               tc
                            );
        } catch (Exception e) {
            // No FFDC code needed
            // d238447 FFDC review - generate FFDC.
            throw (JMSException) JmsErrorUtils.newThrowable(JMSException.class,
                                                            "EXCEPTION_RECEIVED_CWSIA0053",
                                                            new Object[] { e, "JmsSessionImpl.rollbackTransaction (#3)" },
                                                            e,
                                                            "JmsSessionImpl.rollbackTransaction#3",
                                                            this,
                                                            tc
                            );
        } finally {
            if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                SibTr.exit(this, tc, "commitTransaction");
        }
    }
492642
public function rollback() {
        try {
            $this->getTransaction()->rollback();
        } catch(Failed $e) {
            if($e->getMessage() != 'Transaction aborted') {
                throw $e;
            }
        } catch(DbException $e) {
            if($e->getMessage() != 'There is no active transaction') {
                throw $e;
            }
        }
        $transactions = $this->getTransactions();
        unset($transactions[$this->getDbService()]);
        $this->setTransactions($transactions);

        $this->findEventsManager()->fire(self::EVENT_ROLLBACK, $this);
    }
649471
public function rollBack()
    {
        if (!$this->getIsActive()) {
            // do nothing if transaction is not active: this could be the transaction is committed
            // but the event handler to "commitTransaction" throw an exception
            return;
        }

        $this->_level--;
        if ($this->_level === 0) {
            Log::debug('Roll back transaction' . __METHOD__);
            $this->db->pdo->rollBack();
            $this->db->trigger(Connection::EVENT_ROLLBACK_TRANSACTION);
            return;
        }

        $schema = $this->db->getSchema();
        if ($schema->supportsSavepoint()) {
            Log::debug('Roll back to savepoint ' . $this->_level . __METHOD__);
            $schema->rollBackSavepoint('LEVEL' . $this->_level);
        } else {
            Log::info('Transaction not rolled back: nested transaction not supported' . __METHOD__);
            // throw an exception to fail the outer transaction
            throw new Exception('Roll back failed: nested transaction not supported.');
        }
    }
1367127
private boolean rollbackIfNecessary(
      Transactional transactional, Exception e, EntityTransaction txn) {
    boolean commit = true;

    //check rollback clauses
    for (Class<? extends Exception> rollBackOn : transactional.rollbackOn()) {

      //if one matched, try to perform a rollback
      if (rollBackOn.isInstance(e)) {
        commit = false;

        //check ignore clauses (supercedes rollback clause)
        for (Class<? extends Exception> exceptOn : transactional.ignore()) {
          //An exception to the rollback clause was found, DON'T rollback
          // (i.e. commit and throw anyway)
          if (exceptOn.isInstance(e)) {
            commit = true;
            break;
          }
        }

        //rollback only if nothing matched the ignore check
        if (!commit) {
          txn.rollback();
        }
        //otherwise continue to commit

        break;
      }
    }

    return commit;
  }
1341397
public function rollback()
    {
        $context = $this->_context;

        if ($context->transaction_level > 0) {
            $this->logger->info('transaction rollback', 'db.transaction.rollback');
            $context->transaction_level--;

            if ($context->transaction_level === 0) {
                $this->eventsManager->fireEvent('db:rollbackTransaction', $this);

                try {
                    if (!$context->connection->rollBack()) {
                        throw new DbException('rollBack failed.');
                    }
                } catch (\PDOException $exception) {
                    throw new DbException('rollBack failed: ' . $exception->getMessage(), $exception->getCode(), $exception);
                } finally {
                    $this->poolManager->push($this, $context->connection);
                    $context->connection = null;
                }
            }
        }
    }