code: private Transaction getActiveTransaction() throws SystemException {
          Transaction tx = manager.getTransaction();
          if (tx != null && tx.getStatus() != Status.STATUS_NO_TRANSACTION) {
              return tx;
          } else {
              return null;
          }
      }
docs: Checks whether or not we have an active transaction. If so, returns it.
  
  @return the activate transaction, {@code null} if none.
  @throws SystemException thrown by the transaction manager to indicate that it has encountered an
  unexpected error condition that prevents future transaction services from
  proceeding.