Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Both check and rutime exceptions are rolled back #41

Merged
merged 2 commits into from
Jun 16, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Both check and rutime exceptions are rolled back
  • Loading branch information
sdelamo committed Jun 12, 2017
commit 8beb06ef8fcfc3eddad151073aa6182d97dcfbe5
6 changes: 5 additions & 1 deletion docs/src/docs/asciidoc/programmaticTransactions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def transferFunds() {
}
----

In this example we rollback the transaction if the destination account is not active. Also, if an unchecked `Exception` or `Error` (but not a checked `Exception`, even though Groovy doesn't require that you catch checked exceptions) is thrown during the process the transaction will automatically be rolled back.
In this example we rollback the transaction if the destination account is not active.

Also, if an `Exception` (both checked or runtime exception) or `Error` is thrown during the process the transaction will automatically be rolled back..

WARNING: GORM versions prior to 6.0.0 did not rolled back transactions for a checked `Exception`.

You can also use "save points" to rollback a transaction to a particular point in time if you don't want to rollback the entire transaction. This can be achieved through the use of Spring's http:https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/transaction/SavepointManager.html[SavePointManager] interface.

Expand Down