Skip to content

Instantly share code, notes, and snippets.

@kubawieczorek
Created January 27, 2023 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kubawieczorek/1ac53a854f38e6862b4ce378a5dce04d to your computer and use it in GitHub Desktop.
Save kubawieczorek/1ac53a854f38e6862b4ce378a5dce04d to your computer and use it in GitHub Desktop.
decreaseAccountBalance(updateAccountStatement, accountFrom, amount);
if (updateAccountStatement.executeUpdate() == 0) {
throw new RuntimeException("Optimistic locking exception on source account");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment