Skip to content

Commit 9d28e45

Browse files
committed
Clarify limitations of nested transactions in Javadoc
Signed-off-by: Giheon Do <dgh0001@naver.com>
1 parent bb83e54 commit 9d28e45

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-orm/src/main/java/org/springframework/orm/jpa/JpaTransactionManager.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@
9393
*
9494
* <p>This transaction manager supports nested transactions via JDBC Savepoints.
9595
* The {@link #setNestedTransactionAllowed "nestedTransactionAllowed"} flag defaults
96-
* to {@code true} though, since nested transactions will just apply to the JDBC
96+
* to {@code true}, but nested transactions will just apply to the JDBC
9797
* Connection, not to the JPA EntityManager and its cached entity objects and related
9898
* context. You can manually set the flag to {@code false} if you want to disallow nested
9999
* transactions for JDBC access code which participates in JPA transactions (provided
100100
* that your JDBC driver supports Savepoints). <i>Note that JPA itself does not support
101-
* nested transactions! Hence, do not expect JPA access code to semantically
101+
* nested transactions! Furthermore, as most JPA providers (e.g., Hibernate)
102+
* do not support savepoints, {@code Propagation.NESTED} will not work and will typically
103+
* result in an exception. Hence, do not expect JPA access code to semantically
102104
* participate in a nested transaction.</i>
103105
*
104106
* @author Juergen Hoeller

0 commit comments

Comments
 (0)