Returns the transaction, if any, used to deliver the message.

@return the transaction
@throws ResourceException
if the transaction could not be obtained
187583
protected SITransaction getTransaction() throws ResourceException {

        final String methodName = "getTransaction";
        if (TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        if (_transaction == null) {

            try {

                _transaction = _connection.createUncoordinatedTransaction(false);

            } catch (final Exception exception) {

                FFDCFilter.processException(exception, CLASS_NAME + "."
                        + methodName, FFDC_PROBE_1, this);
                if (TRACE.isEventEnabled()) {
                    SibTr.exception(this, TRACE, exception);
                }
                throw new ResourceException(NLS.getFormattedMessage(
                        "UNCOORD_TRAN_CWSIV1201", new Object[] { _connection,
                                exception }, null), exception);

            }
        }

        if (TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName, _transaction);
        }
        return _transaction;

    }
868016
public function getTx()
    {
        if ($this->_tx && $this->_tx->isValid()) return $this->_tx;

        return $this->_tx = new Transaction();
    }
1256619
protected int getTransactionIsolation(final String dataSourceName) {
		Map<String, String> props = getConnPropsByDataSourceName(dataSourceName);
		String val = props.get(PROPS_TRANSACTION_ISOLATION);
		return val == null ? -1 : Integer.parseInt(val);
	}
1024555
public TransactionImpl getTransaction()
    {
        TxBuffer buf = (TxBuffer) txRepository.get();
        return buf != null ? buf.getInternTx() : null;
    }
830517
protected RRSGlobalTransactionWrapper getRRSGlobalTransactionWrapper() throws ResourceException {

        final boolean isTracingEnabled = TraceComponent.isAnyTracingEnabled();

        if (isTracingEnabled && tc.isEntryEnabled()) {
            Tr.entry(this, tc, "getRRSGlobalTransactionWrapper");
        }

        if (rrsGlobalTranWrapper == null) {
            rrsGlobalTranWrapper = new RRSGlobalTransactionWrapper(this);
        }

        if (state == STATE_ACTIVE_INUSE) {
            state = STATE_TRAN_WRAPPER_INUSE;
            tranWrapperInUse = RRSGLOBALTXWRAPPER;
        } else { // state not STATE_ACTIVE_INUSE

            if (state != STATE_TRAN_WRAPPER_INUSE) {
                IllegalStateException e = new IllegalStateException("getRRSGlobalTransactionWrapper: illegal state exception. State = " + getStateString() + " MCW = "
                                                                    + mcWrapperObject_hexString);
                Object[] parms = new Object[] { "getRRSGlobalTransactionWrapper", e };
                Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", parms);
                throw e;
            } else { // state is STATE_TRAN_WRAPPER_INUSE
                if (tranWrapperInUse == NONE) {
                    tranWrapperInUse = RRSGLOBALTXWRAPPER;
                } else { //tranWrapperInUse is NOT NONE
                    if (tranWrapperInUse != RRSGLOBALTXWRAPPER) {
                        // Need RAS and Trace here.
                        IllegalStateException e = new IllegalStateException("getRRSGlobalTransactionWrapper: illegal transaction state exception. State = "
                                                                            + getTranWrapperString());
                        Object[] parms = new Object[] { "getRRSGlobalTransactionWrapper", e };
                        Tr.error(tc, "ILLEGAL_STATE_EXCEPTION_J2CA0079", parms);
                        throw e;
                    }
                }
            }

        }

        if (isTracingEnabled && tc.isEntryEnabled()) {
            Tr.exit(this, tc, "getRRSGlobalTransactionWrapper");
        }

        return rrsGlobalTranWrapper;

    }
1351520
public TransactionManager getTransactionManager() {
        TransactionManager transMgr = null;
        try {
            String jndiName = ApplicationContext.getNamingProvider().getTransactionManagerName();
            Object txMgr = ApplicationContext.getNamingProvider().lookup(null, jndiName, TransactionManager.class);
            transMgr = (TransactionManager)txMgr;
        } catch (Exception ex) {
            StandardLogger logger = LoggerUtil.getStandardLogger();
            logger.severeException(ex.getMessage(), ex);
        }
        return transMgr;
    }
856413
public Token get(Object key,
                     Transaction transaction)
                    throws ObjectManagerException
    {
        try {
            for (Iterator iterator = entrySet().iterator();;) {
                Entry entry = (Entry) iterator.next(transaction);
                Object entryKey = entry.getKey();
                if (key == entryKey || key.equals(entryKey)) {
                    return entry.getValue();

                }
            }
        } catch (java.util.NoSuchElementException exception) {
            // No FFDC code needed, just exited search.
            return null;
        } // try.
    }
1017213
public function getTransaction() {

		$transactionTable	= PaymentTables::getTableName( PaymentTables::TABLE_TRANSACTION );
		$transactionSuccess = Transaction::STATUS_SUCCESS;

		return $this->hasOne( Transaction::class, [ 'orderId' => 'id' ] )->where( "$transactionTable.status=$transactionSuccess" );
	}
127730
private Object getConnection()
    {
        /*
         * Jedis connection = factory.getConnection();
         * 
         * // If resource is not null means a transaction in progress.
         * 
         * if (settings != null) { for (String key : settings.keySet()) {
         * connection.configSet(key, settings.get(key).toString()); } }
         * 
         * if (resource != null && resource.isActive()) { return
         * ((RedisTransaction) resource).bindResource(connection); } else {
         * return connection; } if (resource == null || (resource != null &&
         * !resource.isActive()))
         */
        // means either transaction resource is not bound or it is not active,
        // but connection has already by initialized
        if (isBoundTransaction() && this.connection != null)
        {
            return this.connection;
        }

        // if running within transaction boundary.
        if (resource != null && resource.isActive())
        {
            // no need to get a connection from pool, as nested MULTI is not yet
            // supported.
            if (((RedisTransaction) resource).isResourceBound())
            {
                return ((RedisTransaction) resource).getResource();
            }
            else
            {
                Jedis conn = getAndSetConnection();
                return ((RedisTransaction) resource).bindResource(conn);
            }

        }
        else
        {
            Jedis conn = getAndSetConnection();
            return conn;
        }
    }
467909
@Override
   public synchronized TransactionManager getTransactionManager() {
      if (!lookupDone) {
         doLookups(globalCfg.classLoader());
      }
      if (tm != null)
         return tm;
      if (lookupFailed) {
         if (!noJBossTM) {
            // First try an embedded JBossTM/Wildly instance
            tryEmbeddedJBossTM();
         }

         if (noJBossTM) {
            //fall back to a dummy from Infinispan
            useDummyTM();
         }
      }
      return tm;
   }
680089
@Override
	public int getStatus() throws TransactionManagementException {
		logger.entering(CLASSNAME, "getStatus");
		logger.exiting(CLASSNAME, "getStatus", status);
		return status;
	}
1367271
private SITransaction getContainerTransaction() throws SIResourceException {

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, "getContainerTransaction");
        }

        final SITransaction containerTransaction;

        try {

            // Ensure the connection is associate with a managed connection
            final SibRaManagedConnection managedConnection = getAssociatedManagedConnection();

            // Obtain the current container transaction from the managed
            // connection. The connection manager is required to perform lazy
            // enlistment.
            containerTransaction = managedConnection
                            .getContainerTransaction(_connectionFactory
                                            .getConnectionManager());

        } catch (ResourceException exception) {
            // No FFDC code needed

            if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) {
                SibTr.exception(this, TRACE, exception);
            }
            throw new SIResourceException(NLS.getFormattedMessage(
                                                                  "CONTAINER_TRAN_CWSIV0157", new Object[] { exception },
                                                                  null), exception);

        }

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, "getContainerTransaction",
                       containerTransaction);
        }
        return containerTransaction;

    }
285113
public Transaction get( Transaction transaction ) {
    return RestfulUtils.show( TransactionService.PATH, transaction, Transaction.class, super.httpClient );
  }
1337722
def Get(self):
    """"""
    try:
      value, reg_type = winreg.QueryValueEx(_GetServiceKey(), "Transaction")
    except OSError:
      return

    if reg_type != winreg.REG_BINARY:
      return

    try:
      return rdf_flows.GrrMessage.FromSerializedString(value)
    except message.Error:
      return
778713
public int getTransactionTimeout() throws XAException {

        final String methodName = "getTransactionTimeout";
        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.entry(this, TRACE, methodName);
        }

        final int timeout = _siXaResource.getTransactionTimeout();

        if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) {
            SibTr.exit(this, TRACE, methodName, timeout);
        }
        return timeout;

    }
1244706
public function getDelivery(Transaction $transaction = null)
    {
        if ($this->session->has('delivery-id')) {
            $delivery = $this->manager->getRepository('EcommerceBundle:Delivery')->find($this->session->get('delivery-id'));

            return $delivery;
        }

        $delivery = new Delivery();

        /** @var Address $billingAddress */
        $billingAddress = $this->manager->getRepository('EcommerceBundle:Address')->findOneBy(array(
            'actor' => $this->securityContext->getToken()->getUser(),
            'forBilling' => true
        ));

        if (false === is_null($billingAddress)) {
            $delivery->setFullName($this->securityContext->getToken()->getUser()->getFullName());
            $delivery->setContactPerson($billingAddress->getContactPerson());
            $delivery->setDni($billingAddress->getDni());
            $delivery->setAddressInfo($billingAddress->getAddressInfo());
            $delivery->setPhone($billingAddress->getPhone());
            $delivery->setPhone2($billingAddress->getPhone2());
            $delivery->setPreferredSchedule($billingAddress->getPreferredSchedule());
        }

        $country = $this->manager->getRepository('CoreBundle:Country')->find('es');
        $delivery->setCountry($country);

        if (false === is_null($transaction)) {
            $delivery->setTransaction($transaction);
        }

        return $delivery;
    }
379710
private Connection getConnection() throws JspException, SQLException {
	// Fix: Add all other mechanisms
	Connection conn = null;
	isPartOfTransaction = false;

        TransactionTagSupport parent = (TransactionTagSupport)
	    findAncestorWithClass(this, TransactionTagSupport.class);
	if (parent != null) {
            if (dataSourceSpecified) {
                throw new JspTagException(
                    Resources.getMessage("ERROR_NESTED_DATASOURCE"));
            }
	    conn = parent.getSharedConnection();
            isPartOfTransaction = true;
	} else {
	    if ((rawDataSource == null) && dataSourceSpecified) {
		throw new JspException(
		    Resources.getMessage("SQL_DATASOURCE_NULL"));
	    }
	    DataSource dataSource = DataSourceUtil.getDataSource(rawDataSource,
								 pageContext);
            try {
                conn = dataSource.getConnection();
            } catch (Exception ex) {
                throw new JspException(
                    Resources.getMessage("DATASOURCE_INVALID",
					 ex.toString()));
            }
	}

	return conn;
    }