Abort connection.

@param executor executor
@throws SQLException if a database access error occurs
975827
public void abort(Executor executor) throws SQLException {
    connection.pooledConnection = null;
    connection.abort(executor);
  }
735750
static void rollback(Connection connection) {
        if (connection != null)
            try {
                connection.rollback();
                log.debug("rolled back");
            } catch (SQLException e) {
                throw new SQLRuntimeException(e);
            }
    }
1373723
public static void closeConnection(Connection conn){
		if (conn != null) {
			try {
				conn.close();
			} catch (Exception e) {
				log.warn("Exception when closing database connection.", e);
			}
		}
	}
1124581
private void fireConnectionError(SQLException e) {
    Code code = Code.UNKNOWN;
    if (e instanceof CloudSpannerSQLException) {
      code = ((CloudSpannerSQLException) e).getCode();
    }
    if (!isFatalState(code)) {
      return;
    }
    fireConnectionFatalError(e);
  }
761479
public void stop() throws ExecutionException {

        logger.exiting();

        if (!bStartSession) {
            throw new IllegalStateException("Please call startSession() before calling endSession()");
        }
        bStartSession = false;

        try {
            result.get();
        } catch (InterruptedException e) {
            logger.log(Level.SEVERE, "InterruptedException occured while pinging the WebDriver", e);
        }

        logger.exiting();
    }
464131
public void close() throws SQLException {
        if (isClosed())
            return;
        try {
            this.timeoutExecutor.shutdown();
            protocol.close();
        } catch (QueryException e) {
            throw SQLExceptionMapper.get(e);
        }

    }
574688
private void abort(List<TransactionableResourceManagerListener> listeners) throws XAException
   {
      boolean exception = false;
      for (int i = 0, length = listeners.size(); i < length; i++)
      {
         TransactionableResourceManagerListener listener = listeners.get(i);
         try
         {
            listener.onAbort();
         }
         catch (Exception e)
         {
            log.error("Could not execute the method onAbort", e);
            exception = true;
         }
      }
      if (exception)
      {
         throw new XAException(XAException.XAER_RMERR);
      }
   }
396806
@Override
    public void abort() {
        if (this.aborted) {
            return;
        }
        this.aborted = true;
        HttpConnection conn = this.responseConnection; 
        if (conn != null) {
            conn.close();
        }
    }
470183
@Override
    public void closeConnection() throws JdbcServerException {
        if (!endpointConfiguration.isAutoConnect()) {
            handleMessageAndCheckResponse(JdbcMessage.closeConnection());
        }

        if (connections.decrementAndGet() < 0) {
            connections.set(0);
        }
    }
244719
public void execute(String statement) throws SQLException {
		if (logger.isDebugEnabled()) {
			logger.debug("Executing SQL statement [" + statement + "]");
		}
		
		Connection connection = null;
		Statement stm = null;
		
		try{
			connection = ds.getConnection();
			stm = connection.createStatement();			
			stm.execute(statement);
		} catch (SQLException e) {
			throw e;
		}finally{
			if(stm!=null) stm.close();
			if(connection!=null) connection.close();			
		}
				
	}
100629
void abort() throws SQLException {
        if (mRegisteredLobs != null) {
            for (JDBCLob lob : mRegisteredLobs) {
                lob.close();
            }
            mRegisteredLobs = null;
        }

        if (mIsNested) {
            if (mReady) {
                if (mSavepoint != null) {
                    mConnection.rollback(mSavepoint);
                    mSavepoint = null;
                }
                mReady = false;
            }

            if (mOriginalLevel != LEVEL_NOT_CHANGED) {
                if (mOriginalLevel == Connection.TRANSACTION_NONE) {
                    mConnection.setAutoCommit(true);
                } else {
                    mConnection.setTransactionIsolation(mOriginalLevel);
                }
            }

        } else {
            if (mReady) {
                mConnection.rollback();
                mReady = false;
            }
        }
    }
1101050
@Override
    public void close() throws SQLException
    {
        try
        {
            isClosed = true;
            JDBC4ClientConnectionPool.dispose(NativeConnection);
        }
        catch(Exception x)
        {
            throw SQLError.get(x);
        }
    }
1178747
protected void internalReleaseConnection(ConnectionHandle connectionHandle) throws SQLException {
		if (!this.cachedPoolStrategy){
			connectionHandle.clearStatementCaches(false);
		}

		if (connectionHandle.getReplayLog() != null){
			connectionHandle.getReplayLog().clear();
			connectionHandle.recoveryResult.getReplaceTarget().clear();
		}

		if (connectionHandle.isExpired() || 
				(!this.poolShuttingDown 
						&& connectionHandle.isPossiblyBroken()
				&& !isConnectionHandleAlive(connectionHandle))){

            if (connectionHandle.isExpired()) {
                connectionHandle.internalClose();
            }

			ConnectionPartition connectionPartition = connectionHandle.getOriginatingPartition();
			postDestroyConnection(connectionHandle);

			maybeSignalForMoreConnections(connectionPartition);
			connectionHandle.clearStatementCaches(true);
			return; // don't place back in queue - connection is broken or expired.
		}


		connectionHandle.setConnectionLastUsedInMs(System.currentTimeMillis());
		if (!this.poolShuttingDown){
			putConnectionBackInPartition(connectionHandle);
		} else {
			connectionHandle.internalClose();
		}
	}
641609
public function execute($sql, $executor)
    {
        foreach($this->_onquery as $callback)
            $sql = call_user_func($callback, $sql);

        try {
            $ts = count($this->_onresult) ? microtime(true) : NULL;
            $result = call_user_func($executor, $sql);

            foreach($this->_onresult as $callback)
                $result = call_user_func($callback, $sql, $result, $ts);

            return $result;
        } catch (\Exception $e) {
            foreach($this->_onerror as $callback)
                call_user_func($callback, $e);

            throw $e;
        }
    }
387169
public void abort()
    {
        /*
        do nothing if already rolledback
        */
        if (txStatus == Status.STATUS_NO_TRANSACTION
                || txStatus == Status.STATUS_UNKNOWN
                || txStatus == Status.STATUS_ROLLEDBACK)
        {
            log.info("Nothing to abort, tx is not active - status is " + TxUtil.getStatusString(txStatus));
            return;
        }
        // check status of tx
        if (txStatus != Status.STATUS_ACTIVE && txStatus != Status.STATUS_PREPARED &&
                txStatus != Status.STATUS_MARKED_ROLLBACK)
        {
            throw new IllegalStateException("Illegal state for abort call, state was '" + TxUtil.getStatusString(txStatus) + "'");
        }
        if(log.isEnabledFor(Logger.INFO))
        {
            log.info("Abort transaction was called on tx " + this);
        }
        try
        {
            try
            {
                doAbort();
            }
            catch(Exception e)
            {
                log.error("Error while abort transaction, will be skipped", e);
            }

            // used in managed environments, ignored in non-managed
            this.implementation.getTxManager().abortExternalTx(this);

            try
            {
                if(hasBroker() && getBroker().isInTransaction())
                {
                    getBroker().abortTransaction();
                }
            }
            catch(Exception e)
            {
                log.error("Error while do abort used broker instance, will be skipped", e);
            }
        }
        finally
        {
            txStatus = Status.STATUS_ROLLEDBACK;
            // cleanup things, e.g. release all locks
            doClose();
        }
    }
445225
public void close(boolean closeConnection) throws SQLException {
        if (closeConnection) {
            resultSet.getStatement().getConnection().close();
        } else {
            resultSet.close();
        }

        finished = true;
    }
1344064
public static void closeConnection(Connection con) {
        if (con != null) {
            try {
                con.close();
            } catch (SQLException ex) {
                logger.debug("Could not close JDBC Connection", ex);
            } catch (Throwable ex) {
                logger.debug("Unexpected exception on closing JDBC Connection", ex);
            }
        }
    }