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:43:31 UTC

[cayenne] branch STABLE-4.1 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.1
in repository https://gitbox.apache.org/repos/asf/cayenne.git


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

commit 36233d4e9a073b3f99cbe7a9ca2e8f7fac9b6951
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 02f1855..fa590b1 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);
 ----
 
 You can control transaction isolation level and propagation logic using TransactionDescriptor.