title: Spring @Transaction
body: <p>Im having a hard time understanding how to decide what methods to annotate with Spring @Transaction.</p>
  
  <pre><code>BankService {
  
      transfer(Account from, Account to, int amount){
          deduct(from, amount);
          deposit(to, amount);
      }
  
      deduct(Account account, int amount){
          account = accountRepo.load(account); //make sure we dont have an old reference with old balance            
          int balance = account.getBalance();
          if (balance&lt;amount){
              throw new IllegalStateException("Not enough money");
          } else {
              account.setBalance(balance-amount);
              accountRepo.save(account);
          }
      }
  
      deposit(Account account, int amount){
          account = accountRepo.load(account); //make sure we dont have an old reference with old balance
          account.setBalance(account.getBalance() + amount);
          accountRepo.save(account);
      }
  
  }
  </code></pre>
  
  <p>Within a transfer, if the deduct fails, obviously the deposit should <em>not</em> be persisted even if the deposit doesnt fail.</p>
  
  <p>Out of the five methods (transfer, deduct, deposit, load, save), which ones should be annotated with @Transactional and why?</p>