docs: public void enlistForCleanup(OnePhaseXAResource resource) throws IllegalStateException
      {
          if (tc.isEntryEnabled()) Tr.entry(tc, "enlistForCleanup", resource);
  
          if (LocalTranCurrentImpl.globalTranExists())
          {
              final IllegalStateException ise = new IllegalStateException("Cannot enlist Resource for cleanup. A Global transaction is active.");
              FFDCFilter.processException(ise, "com.ibm.tx.ltc.LocalTranCoordImpl.enlistForCleanup", "443", this);
              Tr.error(tc, "ERR_ENLIST_CLN_TX_GLB_ACT");
              if (tc.isEntryEnabled()) Tr.exit(tc, "enlistForCleanup", ise);
              throw ise;
          }
  
          if (_enlistedResources != null)
          {
              IllegalStateException ise = new IllegalStateException("Cannot enlist Resource for cleanup. This LTC scope is being used for coordination.");
              FFDCFilter.processException(ise, "com.ibm.tx.ltc.LocalTranCoordImpl.enlistForCleanup", "452", this);
              Tr.error(tc, "ERR_ENLIST_CLN_TX_CLEANUP");
              if (tc.isEntryEnabled()) Tr.exit(tc, "enlistForCleanup", ise);
              throw ise;
          }
  
          if (_rollbackOnly)
          {
              final IllegalStateException ise = new IllegalStateException("Cannot enlist Resource. LocalTransaction is marked RollbackOnly.");
              FFDCFilter.processException(ise, "com.ibm.tx.ltc.LocalTranCoordImpl.enlistForCleanup", "461", this);
              Tr.error(tc, "ERR_STATE_RB_ONLY");
              if (tc.isEntryEnabled()) Tr.exit(tc, "enlistForCleanup", ise);
              throw ise;
          }
  
          // d131059.1 IllegalState matches global transaction behaviour
          if (resource == null)
          {
              IllegalStateException ise = new IllegalStateException("enlistForCleanup failed. Resource specified was null.");
              FFDCFilter.processException(ise, "com.ibm.tx.ltc.LocalTranCoordImpl.enlistForCleanup", "471", this);
              if (tc.isEntryEnabled()) Tr.exit(tc, "enlistForCleanup", ise);
              throw ise;
          }
  
          if ((_state != Running) && (_state != Suspended))
          {
              final IllegalStateException ise = new IllegalStateException("Cannot enlist Resource for cleanup. LocalTransaction is completing or completed.");
              FFDCFilter.processException(ise, "com.ibm.tx.ltc.LocalTranCoordImpl.enlistForCleanup", "478", this);
              Tr.error(tc, "ERR_ENLIST_CLN_LTC_COMPLETE");
              if (tc.isEntryEnabled()) Tr.exit(tc, "enlistForCleanup", ise);
              throw ise;
          }
  
          // Applications using LTCs which are SHAREABLE and for which the 
          // resolver is 'application' cannot start any non auto-commit work, 
          // since this could lead to conflict as to which component should
          // commit the work.  Prevent this by throwing an exception here.
          if (_shareable)
          {
              IllegalStateException ise = new IllegalStateException("Cannot enlist Resource for cleanup.  LocalTransaction is shareable and resolver is Application.");
              FFDCFilter.processException(ise, "com.ibm.tx.ltc.LocalTranCoordImpl.enlistForCleanup", "488", this);
              if (tc.isEntryEnabled()) Tr.exit(tc, "enlistForCleanup", ise);
              throw ise;
          }
  
          if (_cleanupResources == null)
          {
              _cleanupResources = new ArrayList<OnePhaseXAResource>();
  
              // Now we need to get the rest of the LTC config to see how to end the LTC
              getComponentMetadataForLTC();
  
              // This is the first resource (local transaction) to be enlisted with the LTC. 
              // Record this with the performance monitor as the start point for the
              // 'LocalTransaction'. In fact multiple resources local transactions can become
              // involved with the LTC and we are going to track them collectively rather
              // than individually.
  
              startTime = perfStarted();
          }
  
          _cleanupResources.add(resource);
  
          if (tc.isEntryEnabled()) Tr.exit(tc, "enlistForCleanup");
      }