code: public synchronized void logRecoveryEntry() throws Exception
      {
          if (tc.isEntryEnabled()) Tr.entry(tc, "logRecoveryEntry", this);
  
          if (!_loggedToDisk)
          {
              if (_terminating) // d172471
              {
                  Tr.warning(tc, "WTRN0084_RESOURCE_ENDING");
                  if (tc.isEntryEnabled()) Tr.exit(tc, "logRecoveryEntry", "Terminating");
                  throw new IllegalStateException();
              }
  
              if (_serializedLogData == null)
              {
                  Tr.warning(tc, "WTRN0039_SERIALIZE_FAILED");
                  if (tc.isEntryEnabled()) Tr.exit(tc, "logRecoveryEntry", "NotSerializable");
                  throw new NotSerializableException("XAResource recovery information not serializable");
              }
  
              try
              {
                  // Perform any pre-log data check (only used for XARecoveryData)
                  preLogData();
  
                  // Now write the partner log record
                  logData(_sectionId);
              }
              catch (Exception e)
              {
                  FFDCFilter.processException(e, "com.ibm.ws.Transaction.JTA.XARecoveryData.logRecoveryEntry", "284", this);
                  if (tc.isEntryEnabled()) Tr.exit(tc, "logRecoveryEntry", e);
                  throw e;
              }
          }
  
          if (tc.isEntryEnabled()) Tr.exit(tc, "logRecoveryEntry");
      }
docs: /*
  Write the recovery data to to the partner log if it has not already
  been written unless we are closing down or the RA is being terminated.
  This will only occur in main-line calls as any recovered data will
  already be written to disk.  We need to check if the terminate flag
  is set either because of shutdown or because an RA is stopping, etc.