docs: protected boolean distributeOutcome() {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "distributeOutcome", this);
  
          boolean retryRequired = false; // indicates whether retry necessary
  
          _diagnosticsRequired = false;
  
          try {
              final long startTime = System.currentTimeMillis();
  
              if (gotAsyncResources()) {
                  retryRequired = completeAsyncResources();
              }
  
              boolean priorityResourceHasFailed = false;
              int failedPriority = 0;
              final int resourceCount = _resourceObjects.size();
  
              // Browse through the non-async participants, processing them as appropriate
              for (int i = 0; i < resourceCount; i++) {
                  final JTAResource currResource = _resourceObjects.get(i);
  
                  if (deliverOutcome(currResource)) {
                      retryRequired = true;
  
                      if (_gotPriorityResourcesEnlisted && _outcome && (currResource instanceof JTAXAResource)) {
                          // Only bail out of we are a 2-PC XAResource - we can carry on if a remote one...
                          if (tc.isEventEnabled())
                              Tr.event(tc, "Bailing because we are committing with priority resources");
                          priorityResourceHasFailed = true;
                          failedPriority = currResource.getPriority();
                      }
                  }
  
                  // If an XA resource has failed, process remaining XA resources with same priority
                  // and any other non-XA resources (eg Corba) with any priority.
                  if (priorityResourceHasFailed) {
                      if (i < (resourceCount - 1)) {
                          final JTAResource nextResource = _resourceObjects.get(i + 1);
                          if (nextResource.getPriority() != failedPriority && (nextResource instanceof JTAXAResource)) {
                              for (int j = i + 1; j < resourceCount; j++) // Need to retry all other resources on z/os
                              {
                                  addToFailedResources(_resourceObjects.get(j));
                              }
                              break;
                          }
                      }
                  }
              }
  
              if (gotAsyncResources()) {
                  retryRequired = getAsyncCompletionResults(startTime, retryRequired);
              }
          } finally {
              updateHeuristicOutcome(calculateHeuristicOutcome());
  
              _retryCompletion = true; // Any further calls are retries
  
              if (_diagnosticsRequired) {
                  logDiagnostics(JTAResourceBase.OUTCOME_DIAGNOSTICS);
                  // Reset in case commit called direct from prepare else we get diagnostics twice.
                  _diagnosticsRequired = false;
              }
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "distributeOutcome", retryRequired);
          return retryRequired;
      }