You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2019/10/29 05:01:18 UTC

[cayenne] branch STABLE-4.0 updated: Transaction.addConnection is not available since 4.0. Fixing the docs

This is an automated email from the ASF dual-hosted git repository.

aadamchik pushed a commit to branch STABLE-4.0
in repository https://gitbox.apache.org/repos/asf/cayenne.git


The following commit(s) were added to refs/heads/STABLE-4.0 by this push:
     new 6651e6f  Transaction.addConnection is not available since 4.0. Fixing the docs
6651e6f is described below

commit 6651e6f0c7b8ef25c3857a9ea79b91db0002ba46
Author: Andrus Adamchik <an...@objectstyle.com>
AuthorDate: Tue Oct 29 08:01:01 2019 +0300

    Transaction.addConnection is not available since 4.0. Fixing the docs
---
 .../src/docs/asciidoc/_cayenne-guide/part2/objectContext.adoc    | 9 +++------
 1 file changed, 3 insertions(+), 6 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 117c263..daf4f40 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
@@ -307,10 +307,10 @@ Sure enough all database operations are transactional, so when an application do
 all SQL execution is wrapped in a database transaction. But this is done behind the scenes
 and is rarely a concern to the application code.
 
-Two cases where transactions need to be taken into consideration are container-managed and
+Two cases where transactions need to be taken into consideration are container- and
 application-managed transactions.
 
-If you are using an EJB container (or some other JTA environment),
+If you are using Spring, EJB or another environment that manages transactions,
 you'll likely need to switch Cayenne runtime into "external transactions mode".
 This is done by setting 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
@@ -338,13 +338,10 @@ Integer result = runtime.performInTransaction(() -> {
 });
 ----
 
-When inside the transaction, current thread Transaction object can be accessed via a static method.
-E.g. here is an example that initializes transaction JDBC connection with a custom connection object :
-
+When inside a transaction, current thread Transaction object can be accessed via a static method:
 [source, java]
 ----
 Transaction tx = BaseTransaction.getThreadTransaction();
-tx.addConnection("mydatanode", myConnection);
 ----