File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
spring-tx/src/main/java/org/springframework/transaction/interceptor Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2023 the original author or authors.
2
+ * Copyright 2002-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -153,8 +153,15 @@ protected static TransactionInfo currentTransactionInfo() throws NoTransactionEx
153
153
* Return the transaction status of the current method invocation.
154
154
* Mainly intended for code that wants to set the current transaction
155
155
* rollback-only but not throw an application exception.
156
+ * <p>This exposes the locally declared transaction boundary with its declared name
157
+ * and characteristics, as managed by the aspect. Ar runtime, the local boundary may
158
+ * participate in an outer transaction: If you need transaction metadata from such
159
+ * an outer transaction (the actual resource transaction) instead, consider using
160
+ * {@link org.springframework.transaction.support.TransactionSynchronizationManager}.
156
161
* @throws NoTransactionException if the transaction info cannot be found,
157
162
* because the method was invoked outside an AOP invocation context
163
+ * @see org.springframework.transaction.support.TransactionSynchronizationManager#getCurrentTransactionName()
164
+ * @see org.springframework.transaction.support.TransactionSynchronizationManager#isCurrentTransactionReadOnly()
158
165
*/
159
166
public static TransactionStatus currentTransactionStatus () throws NoTransactionException {
160
167
TransactionInfo info = currentTransactionInfo ();
You can’t perform that action at this time.
0 commit comments