code: public static void beforeCompletion(TransactionImpl tran, int syncLevel) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "beforeCompletion", new Object[] { tran, syncLevel });
  
          if (syncLevel >= 0) {
              final ArrayList syncs = _syncLevels.get(syncLevel);
  
              if (syncs != null) {
                  final int localID = (int) tran.getLocalTID();
                  final byte[] globalID = tran.getTID();
                  final int numSyncs = syncs.size();
  
                  for (int s = 0; s < numSyncs; s++) {
                      ((SynchronizationCallback) syncs.get(s)).beforeCompletion(localID, globalID);
                      // exception here means rollback
                  }
              }
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "beforeCompletion");
      }
docs: Notify all the registered syncs of the begin
  of the completion phase of the given transaction