title: How to track the result of transaction in spring?
body: <p>You can imagine I have some service, say it will be money service. Also assume I have one method, that perform actual transfer (Quite mundane example, I know). And I have to return <strong>true</strong> if transaction ended up successfully, and <strong>false</strong>, if it is not. So, here is the think that I do not actually grasp - how do I track the result of transaction in Spring Framework? (May be even for just simple logging purposes) Example of my transfer method is present below. Appreciate any help.</p>
  <pre><code>@Transactional
      public boolean transferMoneyFromOneAccountToAnother(MoneyTransferForm moneyTransferForm) {
          final UserBankAccount sourceBankAccount = bankAccountRepository.findBankAccountByIdentifier(
                  moneyTransferForm.getSourceAccountIdentifier()
          );
          final UserBankAccount targetBankAccount = bankAccountRepository.findBankAccountByIdentifier(
                  moneyTransferForm.getTargetAccountIdentifier()
          );
          subtractMoneyFromSourceAccount(moneyTransferForm, sourceBankAccount);
          appendMoneyToTargetAccount(moneyTransferForm, targetBankAccount);
          bankAccountRepository.updateUserBankAccount(sourceBankAccount);
          bankAccountRepository.updateUserBankAccount(targetBankAccount);
      }
  </code></pre>