code: private Object invokeInTransactionAndUnitOfWork(MethodInvocation methodInvocation)
        throws Throwable {
      boolean unitOfWorkAlreadyStarted = unitOfWork.isActive();
      if (!unitOfWorkAlreadyStarted) {
        unitOfWork.begin();
      }
  
      Throwable originalThrowable = null;
      try {
        return dslContextProvider.get().transactionResult(() -> {
          try {
            return methodInvocation.proceed();
          } catch (Throwable e) {
            if (e instanceof RuntimeException) {
              throw (RuntimeException) e;
            }
  
            throw new RuntimeException(e);
          }
        });
      } catch (Throwable t) {
        originalThrowable = t;
        throw t;
      } finally {
        if (!unitOfWorkAlreadyStarted) {
          endUnitOfWork(originalThrowable);
        }
      }
    }
docs: Invokes the method wrapped within a unit of work and a transaction.
  
  @param methodInvocation the method to be invoked within a transaction
  @return the result of the call to the invoked method
  @throws Throwable if an exception occurs during the method invocation, transaction, or unit of
  work