public TransactionContext getNewTransaction(int propagation) {
    DefaultTransactionDefinition transactionDefinition = new DefaultTransactionDefinition(propagation);
    // The TxnStore default isolation level is READ_COMMITTED
    transactionDefinition.setIsolationLevel(Isolation.READ_COMMITTED.value());
    TransactionContext context = new TransactionContext(
        realTransactionManager.getTransaction(transactionDefinition), this);
    contexts.set(context);
    return context;
  }
Begins a new transaction or returns an existing, depending on the passed Transaction Propagation.
The created transaction is wrapped into a {@link TransactionContext} which is {@link AutoCloseable} and allows using
the wrapper inside a try-with-resources block.

@param propagation The transaction propagation to use.
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/jdbc/TransactionContextManager.java