code: public boolean distributeEnd(int flags) {
          if (tc.isEntryEnabled())
              Tr.entry(tc, "distributeEnd", Util.printFlag(flags));
  
          boolean result = true;
  
          for (int i = _resourceObjects.size(); --i >= 0;) {
              final JTAResource resource = _resourceObjects.get(i);
  
              if (!sendEnd(resource, flags)) {
                  result = false;
              }
          }
  
          if (_sameRMResource != null) {
              if (!sendEnd(_sameRMResource, flags)) {
                  result = false;
              }
          }
  
          if (tc.isEntryEnabled())
              Tr.exit(tc, "distributeEnd", result);
          return result;
      }
docs: Send end to all registered resources
  
  @param flags
  
  @return whether we managed to successfully end all the resources