This is an automated email from the ASF dual-hosted git repository.
ntimofeev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cayenne.git
The following commit(s) were added to refs/heads/master by this push:
new 74a27a410 CAY-2828 Rename values in
`org.apache.cayenne.configuration.Constants`
74a27a410 is described below
commit 74a27a41049aacade6ae8a577180fdd4de569d25
Author: stariy95 <[email protected]>
AuthorDate: Mon Nov 27 12:02:23 2023 +0400
CAY-2828 Rename values in `org.apache.cayenne.configuration.Constants`
---
.../src/docs/asciidoc/_cayenne-guide/part2/objectContext.adoc | 2 +-
.../src/docs/asciidoc/_cayenne-guide/part2/starting.adoc | 2 +-
.../src/docs/asciidoc/_cayenne-guide/part2/tuning.adoc | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git
a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/objectContext.adoc
b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/objectContext.adoc
index dff50da92..7ae7df459 100644
---
a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/objectContext.adoc
+++
b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/objectContext.adoc
@@ -266,7 +266,7 @@ Considering how much attention is given to managing
transactions in most other O
Two cases where transactions need to be taken into consideration are
container- and
application-managed transactions.
-If you are using Spring, EJB or another environment that manages transactions,
you’ll likely need to switch the Cayenne runtime into "external transactions
mode". This is done by setting the DI configuration property defined in
`Constants.SERVER_EXTERNAL_TX_PROPERTY` (see Appendix A). If this property is
set to "true", Cayenne assumes that JDBC Connections obtained by runtime,
whenever that might happen, are all coming from a transactional DataSource
managed by the container. In this cas [...]
+If you are using Spring, EJB or another environment that manages transactions,
you’ll likely need to switch the Cayenne runtime into "external transactions
mode". This is done by setting the DI configuration property defined in
`Constants.EXTERNAL_TX_PROPERTY` (see Appendix A). If this property is set to
"true", Cayenne assumes that JDBC Connections obtained by runtime, whenever
that might happen, are all coming from a transactional DataSource managed by
the container. In this case, Caye [...]
In the second scenario, an application might need to define its own
transaction scope that spans more than one Cayenne operation. E.g. two
sequential commits that need to be rolled back together in case of failure.
This can be done via the `CayenneRuntime.performInTransaction` method:
diff --git
a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/starting.adoc
b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/starting.adoc
index e7c3a786c..2bc270ea6 100644
---
a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/starting.adoc
+++
b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/starting.adoc
@@ -33,7 +33,7 @@ CayenneRuntime encapsulates a single Cayenne stack. Most
applications will just
----
Module extensions = binder ->
CoreModule.contributeProperties(binder)
- .put(Constants.SERVER_EXTERNAL_TX_PROPERTY, "true");
+ .put(Constants.EXTERNAL_TX_PROPERTY, "true");
CayenneRuntime runtime = CayenneRuntime.builder()
.addConfig("com/example/cayenne-project.xml")
.addModule(extensions)
diff --git
a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/tuning.adoc
b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/tuning.adoc
index 639ecfda9..9bf6e8f05 100644
---
a/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/tuning.adoc
+++
b/docs/asciidoc/cayenne-guide/src/docs/asciidoc/_cayenne-guide/part2/tuning.adoc
@@ -75,7 +75,7 @@ but it requires (1+N) SQL statements to be executed, where N
is the number of pr
*Disjoint-by-ID prefetch semantics* is a variation of disjoint prefetch where
related objects are matched against a set
of IDs derived from the fetched main objects (or intermediate objects in a
multi-step prefetch). Cayenne limits the
size of the generated WHERE clause, as most DBs can't parse arbitrary large
SQL. So prefetch queries are broken into
-smaller queries. The size of is controlled by the DI property
`Constants.SERVER_MAX_ID_QUALIFIER_SIZE_PROPERTY`
+smaller queries. The size of is controlled by the DI property
`Constants.MAX_ID_QUALIFIER_SIZE_PROPERTY`
(the default number of conditions in the generated WHERE clause is 10000).
Cayenne will generate (1 + N * M) SQL statements for each query using
disjoint-by-ID prefetches,
where N is the number of relationships to prefetch, and M is the number of
queries for a given prefetch
@@ -341,7 +341,7 @@ This is unacceptable in most situations.
- Synchronization will interfere with optimistic locking.
So we've made a good case for disabling synchronization in most webapps. To do
that, set to "false" the following DI property -
-`Constants.SERVER_CONTEXTS_SYNC_PROPERTY`, using one of the standard Cayenne
DI approaches. E.g. from command line:
+`Constants.CONTEXTS_SYNC_PROPERTY`, using one of the standard Cayenne DI
approaches. E.g. from command line:
[source]
----
@@ -357,7 +357,7 @@ public class MyModule implements Module {
@Override
public void configure(Binder binder) {
CoreModule.contributeProperties(binder)
- .put(Constants.SERVER_CONTEXTS_SYNC_PROPERTY, "false");
+ .put(Constants.CONTEXTS_SYNC_PROPERTY, "false");
}
}
----