Skip to content

Commit

Permalink
Fix typo in data-access section
Browse files Browse the repository at this point in the history
  • Loading branch information
1993heqiang authored and snicoll committed Sep 5, 2022
1 parent 0389fcc commit 111a990
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/docs/asciidoc/data-access.adoc
Expand Up @@ -1520,7 +1520,7 @@ programming arrangements as the following listing shows:

Note that there are special considerations for the returned `Publisher` with regards to
Reactive Streams cancellation signals. See the <<tx-prog-operator-cancel>> section under
"Using the TransactionOperator" for more details.
"Using the TransactionalOperator" for more details.


[[transaction-declarative-annotations-method-visibility]]
Expand Down Expand Up @@ -2474,32 +2474,32 @@ different settings (for example, a different isolation level), you need to creat
two distinct `TransactionTemplate` instances.

[[tx-prog-operator]]
==== Using the `TransactionOperator`
==== Using the `TransactionalOperator`

The `TransactionOperator` follows an operator design that is similar to other reactive
The `TransactionalOperator` follows an operator design that is similar to other reactive
operators. It uses a callback approach (to free application code from having to do the
boilerplate acquisition and release transactional resources) and results in code that is
intention driven, in that your code focuses solely on what you want to do.

NOTE: As the examples that follow show, using the `TransactionOperator` absolutely
NOTE: As the examples that follow show, using the `TransactionalOperator` absolutely
couples you to Spring's transaction infrastructure and APIs. Whether or not programmatic
transaction management is suitable for your development needs is a decision that you have
to make yourself.

Application code that must run in a transactional context and that explicitly uses
the `TransactionOperator` resembles the next example:
the `TransactionalOperator` resembles the next example:

[source,java,indent=0,subs="verbatim,quotes",role="primary"]
.Java
----
public class SimpleService implements Service {
// single TransactionOperator shared amongst all methods in this instance
// single TransactionalOperator shared amongst all methods in this instance
private final TransactionalOperator transactionalOperator;
// use constructor-injection to supply the ReactiveTransactionManager
public SimpleService(ReactiveTransactionManager transactionManager) {
this.transactionOperator = TransactionalOperator.create(transactionManager);
this.transactionalOperator = TransactionalOperator.create(transactionManager);
}
public Mono<Object> someServiceMethod() {
Expand Down

0 comments on commit 111a990

Please sign in to comment.