code: public void teardownLocalTxContext(TxContextChange changedContext)
      {
  
          LocalTransactionCoordinator activatedLocalTx = changedContext.getActivatedLocalTx();
  
          // If setupLocalTxContext did nothing, teardownLocalContext will do nothing
  
          if (activatedLocalTx != null) {
  
              // setupLocalTxContext must have swapped a different local tx context
              // onto thread so suspend it now (ie. make local tx sticky)
  
              suspendLocalTx();
              stickyLocalTxTable.put(changedContext.getKey(), activatedLocalTx);
  
              // If setupLocalTxContext suspended a local tx which was already on the thread,
              // resume that context now (ie. swap back the original context)
  
              LocalTransactionCoordinator previousLocalTx = changedContext.getSuspendedLocalTx();
              if (previousLocalTx != null) {
  
                  resumeLocalTx(previousLocalTx);
              }
  
              // If setupLocalTxContext suspended a global tx which was already on the thread,
              // resume that context now (ie. swap back the original context)
              Transaction previousGlobalTx = changedContext.getSuspendedGlobalTx(); //LIDB1673.2.1.5
              if (previousGlobalTx != null) {
  
                  try {
                      resumeGlobalTx(previousGlobalTx, TIMEOUT_CLOCK_START);
                  } catch (Exception ex) {
                      FFDCFilter.processException(ex, CLASS_NAME + ".teardownLocalTxContext",
                                                  "650", this);
                      if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                          Tr.event(tc, "Global tx resume failed", ex);
                      }
                  }
              }
  
          } // End if setupLocalTxContext did swap contexts
  
      }
docs: Restore any local transaction context change made by the
  setupLocalTxContext method. <p>