@Override
  public void registerSynchronization(Synchronization synchronisation)
      throws SystemException, IllegalStateException, RollbackException {
    {
      LogWriter writer = TransactionUtils.getLogWriter();
      if (writer.fineEnabled()) {
        writer.fine("registering JTA synchronization: " + synchronisation);
      }
    }
    if (synchronisation == null) {
      throw new SystemException(
          "TransactionImpl::registerSynchronization:Synchronization is null");
    }
    gtx = tm.getGlobalTransaction();
    if (gtx == null) {
      throw new SystemException(
          "no transaction present");
    }
    synchronized (gtx) {
      int status = -1;
      if ((status = gtx.getStatus()) == Status.STATUS_MARKED_ROLLBACK) {
        String exception =
            "TransactionImpl::registerSynchronization: Synchronization cannot be registered because the transaction has been marked for rollback";
        LogWriter writer = TransactionUtils.getLogWriter();
        if (writer.fineEnabled()) {
          writer.fine(exception);
        }
        throw new RollbackException(exception);
      } else if (status != Status.STATUS_ACTIVE) {
        String exception =
            "TransactionImpl::registerSynchronization: Synchronization cannot be registered on a transaction which is not active";
        LogWriter writer = TransactionUtils.getLogWriter();
        if (writer.fineEnabled()) {
          writer.fine(exception);
        }
        throw new IllegalStateException(exception);
      }
      syncList.add(synchronisation);
    }
  }
Register the Synchronizations by adding the synchronization object to a list of
synchronizations

@param synchronisation Synchronization the Synchronization which needs to be registered

@see javax.transaction.Transaction#registerSynchronization(javax.transaction.Synchronization)
geode-core/src/main/java/org/apache/geode/internal/jta/TransactionImpl.java