Commit Graph

712 Commits

Author SHA1 Message Date
KimJuHyun
f1cbbd2aa8 Remove redundant array length check
Closes gh-33655
2024-10-07 08:24:37 +02:00
Sébastien Deleuze
8e3846991d Reuse NoTransactionInContextException instances
New NoTransactionInContextException instances are created frequently in
TransactionContextManager#currentContext() when there is no transaction,
we could reuse the same instance instead to reduce the GC pressure.

Closes gh-33601
2024-09-27 17:45:02 +02:00
Juergen Hoeller
d3dd01e227 Adapt transactional test component declaration
See gh-33470
2024-09-27 11:06:30 +02:00
오영택
cc3948e14c feat: Implemented to throw a runtime error if a class has @Transactional 2024-09-27 10:59:52 +02:00
Yanming Zhou
8941e2876e Replace 'e.g.' with 'for example' in documentation and comments
Closes gh-33515
2024-09-26 14:11:17 +02:00
Sam Brannen
717b972f88 Polish contribution
See gh-33452
2024-09-03 18:08:23 +02:00
Yanming Zhou
019c0b1d4e Expand acronyms FQN and FQCN
Closes gh-33452
2024-09-03 17:30:27 +02:00
Juergen Hoeller
28668d774b Enforce non-null value in requiredSingleResult/requiredUniqueResult
Closes gh-33300
2024-08-05 15:53:17 +02:00
Simon Baslé
0c319a89d7 Merge branch '6.1.x' 2024-07-10 15:36:03 +02:00
Simon Baslé
1d890a8952 Make coroutines with custom AOP aspects work with @Transactional
Previous to this change, the transactional aspect would supersed the
user-defined AspectJ aspect, shortcircuiting to calling the original
Kotlin suspending function.

This change simplifies the TransactionAspectSupport way of dealing with
transactional coroutines, thanks to the fact that lower level support
for AOP has been introduced in c8169e5c.

Closes gh-33095
2024-07-10 15:35:43 +02:00
Juergen Hoeller
82af8e62c1 Merge branch '6.1.x' 2024-06-18 18:32:29 +02:00
Juergen Hoeller
65dbfd09b4 Defensive PersistenceExceptionTranslator bean retrieval on shutdown
Closes gh-33067
2024-06-18 18:31:15 +02:00
Juergen Hoeller
645556a28c Merge branch '6.1.x' 2024-05-07 15:53:00 +02:00
Juergen Hoeller
4f02be263f Polishing 2024-05-07 15:52:13 +02:00
Stéphane Nicoll
9f46dd7d86 Merge branch '6.1.x' 2024-04-22 14:52:31 +02:00
Stéphane Nicoll
f45e7b9b9b Relax scope of DataIntegrityViolationException
This commit updates the Javadoc of DataIntegrityViolationException to
broaden its scope as it was too specific before.

Closes gh-32631
2024-04-22 14:49:17 +02:00
Juergen Hoeller
e42c5ca52b Merge branch '6.1.x' 2024-04-18 12:20:14 +02:00
Juergen Hoeller
0e0397a385 Polishing 2024-04-18 12:18:18 +02:00
Juergen Hoeller
4e20cdeb43 Expand comment on participation in existing transaction
Closes gh-32659
2024-04-18 12:16:33 +02:00
Simon Baslé
ce8758b83c Merge branch '6.1.x' 2024-04-16 16:47:01 +02:00
xumengqi
8ec27438e7 Fix transaction definition setTimeout error message since zero is valid
This commit rephrases the `DefaultTransactionDefinition#setTimeout`
exception message to better reflect the fact that 0 is a valid input
value.

Even though this often leads to a transaction immediately timing out
after opening, there is one notable case where this has another
meaningful effect: in Jakarta transactions (`UserTransaction`), when
passing 0 "the transaction service restores the default value".

Closes gh-32635
2024-04-16 16:39:23 +02:00
Simon Baslé
43b5c81dad Merge branch '6.1.x' 2024-04-16 16:29:53 +02:00
xumengqi
bf3278596c Include actual cause's message in various parsing exception messages
This change improves the message of several parsing-related exceptions
that would previously entirely swallow the original exception's message
and sometimes have a slightly misleading message as a result.

This is done by appending the cause's `toString` representation to the
IllegalArgumentException messages instead of an hardcoded "cause".

Closes gh-32636
2024-04-16 16:25:42 +02:00
Sébastien Deleuze
8b51b36729 Perform NullAway build-time checks in more modules
This commit enables null-safety build-time checks in
all remaining modules except spring-test.

See gh-32475
2024-03-26 15:53:01 +01:00
Sébastien Deleuze
2fea3d7921 Merge branch '6.1.x' 2024-03-26 15:41:46 +01:00
Sébastien Deleuze
290a41d398 Refine null-safety in more modules
This commit refines the null-safety in all remaining modules
except spring-test.

See gh-32475
2024-03-26 15:39:18 +01:00
Sam Brannen
e1b1435a00 Stop referring to JDK 1.5 plus polishing 2024-03-14 16:00:51 +01:00
Juergen Hoeller
13221ac0ef Merge branch '6.1.x'
# Conflicts:
#	spring-tx/src/test/java/org/springframework/transaction/annotation/EnableTransactionManagementTests.java
#	spring-tx/src/test/java/org/springframework/transaction/interceptor/TransactionInterceptorTests.java
2024-03-06 18:09:32 +01:00
Juergen Hoeller
0955f541cb Polishing 2024-03-06 18:03:36 +01:00
Juergen Hoeller
14a461e795 Consider type-level qualifier annotations for transaction manager selection
Closes gh-24291
2024-03-06 13:36:33 +01:00
Juergen Hoeller
6f7f032ced Merge branch '6.1.x' 2024-03-05 18:24:01 +01:00
Juergen Hoeller
a0ae849856 Polishing 2024-03-05 18:23:13 +01:00
Juergen Hoeller
7d4c8a403e Introduce configurable default rollback rules
Includes rollbackOn annotation attribute on @EnableTransactionManagement and addDefaultRollbackRule method on AnnotationTransactionAttributeSource, as well as publicMethodsOnly as instance-level flag (also on AnnotationCacheOperationSource).

Closes gh-23473
2024-03-05 18:08:08 +01:00
Juergen Hoeller
30e75e4a09 Enable efficient pointcut checks for composite sources as well
Closes gh-20072
2024-03-05 13:34:48 +01:00
Juergen Hoeller
e9110c0729 Polishing 2024-03-04 22:48:52 +01:00
Juergen Hoeller
3d7ef3ebfc Avoid storage of null marker per method for proxy decision purposes
Includes missing isCandidateClass support on JCacheOperationSource.

Closes gh-20072
2024-03-04 12:55:33 +01:00
Juergen Hoeller
861ef88d9f Expose savepoint callbacks on TransactionSynchronization
Closes gh-30509
2024-03-01 16:48:51 +01:00
Sam Brannen
122372c580 Spring cleaning: update copyright headers 2024-02-23 12:21:22 +01:00
Sam Brannen
5ae6c0e8ca Spring cleaning: avoid unnecessary super() invocations 2024-02-23 12:21:22 +01:00
Juergen Hoeller
524588ef93 Avoid transaction listener execution without transaction management setup
Closes gh-32319
2024-02-23 11:53:05 +01:00
Juergen Hoeller
229214a9b0 Merge branch '6.1.x'
# Conflicts:
#	spring-jdbc/src/main/java/org/springframework/jdbc/JdbcUpdateAffectedIncorrectNumberOfRowsException.java
2024-02-22 17:01:04 +01:00
Juergen Hoeller
4dc3eac864 Polishing 2024-02-22 16:56:22 +01:00
Juergen Hoeller
0188270138 Clarify transaction metadata exposed from currentTransactionStatus()
Closes gh-32310
2024-02-22 16:56:17 +01:00
Sam Brannen
b9c304b890 Polish contribution
See gh-32291
2024-02-21 16:19:53 +01:00
Patrick Strawderman
e1a32d4ba9 Avoid resizing of fixed-size HashSet/LinkedHashSet variants
Add helpers to CollectionUtils for building HashSets and LinkedHashSets
that can hold an expected number of elements without needing to
resize/rehash.

Closes gh-32291
2024-02-21 16:19:53 +01:00
Stéphane Nicoll
d4401cc69a Polish 2024-02-01 14:40:02 +01:00
Sam Brannen
db535863dd Consistently use class literals for primitive types
To improve consistency and avoid confusion regarding primitive types
and their wrapper types, this commit ensures that we always use class
literals for primitive types.

For example, instead of using the `Void.TYPE` constant, we now
consistently use `void.class`.
2024-01-30 15:26:12 +01:00
Juergen Hoeller
00bda65848 Polishing 2024-01-19 17:09:58 +01:00
Stéphane Nicoll
f5b0d9509d Polish 2024-01-17 18:41:15 +01:00
Juergen Hoeller
79cc0ec4aa Make prepareSynchronization overridable again
Closes gh-32000
2024-01-10 13:07:20 +01:00