docs: @Override
     public void registerSynchronization(Synchronization sync)
           throws RollbackException, IllegalStateException, SystemException {
        if (trace) {
           log.tracef("Transaction.registerSynchronization(%s) invoked in transaction with Xid=%s", sync, xid);
        }
        checkStatusBeforeRegister("synchronization");
        if (trace) {
           log.tracef("Registering synchronization handler %s", sync);
        }
        synchronized (xidLock) {
           syncs.add(sync);
        }
     }