code: protected void recordLog(JTAResource resource) throws SystemException {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "recordLog", new Object[] { this, resource });
  
          //
          // If we do not yet have a log unit, try to get one for this transaction
          //
          if (_logUnit == null) {
              _logUnit = _transaction.getLog();
          }
  
          //
          // If we now have a log unit, then log the resource
          // (If there is no log unit now, we are running with logging disabled
          // or on z/OS which does not use the RLS logging for transactions).
          //
          if (_logUnit != null) {
              final RecoverableUnitSection rus;
              if (resource instanceof JTAXAResource) {
                  if (_xalogSection == null) {
                      _xalogSection = createLogSection(TransactionImpl.XARESOURCE_SECTION, _logUnit);
                  }
                  rus = _xalogSection;
              } else {
                  rus = recordOtherResourceTypes(resource);
              }
  
              resource.log(rus);
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "recordLog");
      }
docs: Records information in the transaction log about a JTAResource object in the appropriate
  log section. This indicates that the object has prepared to commit.
  
  @param resource The resource object to log.