@Override
  public void begin() throws NotSupportedException, SystemException {
    if (loggedJTATransactionManagerDeprecatedWarning.compareAndSet(false, true)) {
      logger.warn(
          "Geode JTA transaction manager is deprecated since 1.2.0, please use a third party JTA transaction manager instead");
    }
    if (!isActive) {
      throw new SystemException(
          "TransactionManager invalid");
    }
    LogWriter log = TransactionUtils.getLogWriter();
    if (log.fineEnabled()) {
      log.fine("TransactionManager.begin() invoked");
    }
    Thread thread = Thread.currentThread();
    if (transactionMap.get(thread) != null) {
      String exception =
          "Nested transaction is not supported";
      if (VERBOSE) {
        log.fine(exception);
      }
      throw new NotSupportedException(exception);
    }
    try {
      TransactionImpl transaction = new TransactionImpl();
      transactionMap.put(thread, transaction);
      GlobalTransaction globalTransaction = new GlobalTransaction();
      globalTransactionMap.put(transaction, globalTransaction);
      globalTransaction.addTransaction(transaction);
      globalTransaction.setStatus(Status.STATUS_ACTIVE);
    } catch (Exception e) {
      String exception = String.format("SystemException due to %s",
          e);
      if (log.severeEnabled()) {
        log.severe(String.format("SystemException due to %s",
            e));
      }
      throw new SystemException(exception);
    }
  }
Create a new transaction and associate it with the current thread if none exists with the
current thread else throw an exception since nested transactions are not supported

Create a global transaction and associate the transaction created with the global transaction

@throws NotSupportedException - Thrown if the thread is already associated with a transaction
        and the Transaction Manager implementation does not support nested transactions.
@throws SystemException - Thrown if the transaction manager encounters an unexpected error
        condition.

@see javax.transaction.TransactionManager#begin()
geode-core/src/main/java/org/apache/geode/internal/jta/TransactionManagerImpl.java