private static void cleanup() {
    if (transactionManager instanceof TransactionManagerImpl) {
      TransactionManagerImpl.refresh();
      // unbind and set TransactionManager to null, so as to
      // initialize TXManager correctly if the cache is being restarted
      transactionManager = null;
      try {
        if (ctx != null) {
          ctx.unbind("java:/TransactionManager");
        }
      } catch (NamingException e) {
        // ok to ignore, rebind will be tried later
      }
    }
    dataSourceMap.values().stream().forEach(JNDIInvoker::closeDataSource);
    dataSourceMap.clear();
    IGNORE_JTA = Boolean.getBoolean(GeodeGlossary.GEMFIRE_PREFIX + "ignoreJTA");
  }
Bind the transaction resources. Bind UserTransaction and TransactionManager.
<p>
If there is pre-existing JNDI tree in the system and TransactionManager / UserTransaction is
already bound, GemFire will make use of these resources, but if TransactionManager /
UserTransaction is not available, the GemFire TransactionManager / UserTransaction will be
bound to the JNDI tree.
<p>
geode-core/src/main/java/org/apache/geode/internal/jndi/JNDIInvoker.java