code: @Override
      public int getLocalId() {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "getLocalId");
  
          int localId = 0;
  
          final TransactionImpl tran = ((TranManagerSet) TransactionManagerFactory.getTransactionManager()).getTransactionImpl();
  
          if (tran != null) {
              localId = (int) tran.getLocalTID();
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "getLocalId", localId);
          return localId;
      }
docs: Returns a process-unique identifier for the transaction currently associated
  with the calling thread. The local-id is valid only within the local process.
  The local-id is recovered as part of the state of a recovered transaction.
  
  @return an integer that uniquely identifies the current transaction within
  the calling process. If there is no active transaction currently associated with the thread, returns 0;