Skip to content

Commit 40da093

Browse files
committed
Polishing
1 parent b32a2ca commit 40da093

File tree

1 file changed

+10
-9
lines changed
  • framework-docs/modules/ROOT/pages/data-access/transaction/declarative

1 file changed

+10
-9
lines changed

framework-docs/modules/ROOT/pages/data-access/transaction/declarative/annotations.adoc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -442,29 +442,30 @@ regarding possible unintentional matches for pattern-based rollback rules.
442442

443443
[NOTE]
444444
====
445-
As of 6.2, you can globally change the default rollback behavior: e.g. through
445+
As of 6.2, you can globally change the default rollback behavior – for example, through
446446
`@EnableTransactionManagement(rollbackOn=ALL_EXCEPTIONS)`, leading to a rollback
447447
for all exceptions raised within a transaction, including any checked exception.
448448
For further customizations, `AnnotationTransactionAttributeSource` provides an
449449
`addDefaultRollbackRule(RollbackRuleAttribute)` method for custom default rules.
450450
451451
Note that transaction-specific rollback rules override the default behavior but
452452
retain the chosen default for unspecified exceptions. This is the case for
453-
Spring's `@Transactional` as well as JTA's `jakarta.transaction.Transactional`.
453+
Spring's `@Transactional` as well as JTA's `jakarta.transaction.Transactional`
454+
annotation.
454455
455456
Unless you rely on EJB-style business exceptions with commit behavior, it is
456-
advisable to switch to `ALL_EXCEPTIONS` for a consistent rollback even in case
457-
of a (potentially accidental) checked exception. Also, it is advisable to make
458-
that switch for Kotlin-based applications where there is no enforcement of
459-
checked exceptions at all.
457+
advisable to switch to `ALL_EXCEPTIONS` for consistent rollback semantics even
458+
in case of a (potentially accidental) checked exception. Also, it is advisable
459+
to make that switch for Kotlin-based applications where there is no enforcement
460+
of checked exceptions at all.
460461
====
461462

462463
Currently, you cannot have explicit control over the name of a transaction, where 'name'
463464
means the transaction name that appears in a transaction monitor and in logging output.
464465
For declarative transactions, the transaction name is always the fully-qualified class
465-
name + `.` + the method name of the transactionally advised class. For example, if the
466+
name of the transactionally advised class + `.` + the method name. For example, if the
466467
`handlePayment(..)` method of the `BusinessService` class started a transaction, the
467-
name of the transaction would be: `com.example.BusinessService.handlePayment`.
468+
name of the transaction would be `com.example.BusinessService.handlePayment`.
468469

469470
[[tx-multiple-tx-mgrs-with-attransactional]]
470471
== Multiple Transaction Managers with `@Transactional`
@@ -565,7 +566,7 @@ e.g. with a value of "order" it can be used for autowiring purposes (identifying
565566
the order repository) as well as transaction manager selection, as long as the
566567
target beans for autowiring as well as the associated transaction manager
567568
definitions declare the same qualifier value. Such a qualifier value only needs
568-
to be unique with a set of type-matching beans, not having to serve as an id.
569+
to be unique within a set of type-matching beans, not having to serve as an ID.
569570
====
570571

571572
[[tx-custom-attributes]]

0 commit comments

Comments
 (0)