Juergen Hoeller
6fc4898a1b
Find TransactionalEventListener annotation on target method
...
Closes gh-31034
2023-08-12 11:19:21 +02:00
Sam Brannen
96fd3c10fb
Update copyright headers
2023-08-07 12:08:04 +03:00
Juergen Hoeller
6090eb0b42
Merge branch '6.0.x'
2023-08-06 15:00:42 +02:00
Juergen Hoeller
c36174b263
Polishing
2023-08-06 14:59:44 +02:00
Juergen Hoeller
6e5af9dccb
Polishing
2023-08-06 14:25:39 +02:00
Juergen Hoeller
3253d2de89
Introduce TransactionExecutionListener with begin/commit/rollback notifications
...
Includes ConfigurableTransactionManager interface for listener registration.
Includes additional introspection methods on TransactionExecution interface.
Includes default method declarations on TransactionStatus/SmartTransactionObject.
Closes gh-27479
2023-08-06 14:03:44 +02:00
Juergen Hoeller
d250a5155a
Consistent dependency declarations
2023-08-02 00:56:50 +02:00
Juergen Hoeller
52176edcbf
Polishing
2023-08-02 00:06:49 +02:00
Juergen Hoeller
ae279eaced
Polishing
2023-08-01 23:52:48 +02:00
Juergen Hoeller
5e26786bab
Fix malformed javadoc
2023-08-02 01:13:27 +02:00
Juergen Hoeller
3b1af692cc
Merge branch '6.0.x'
...
# Conflicts:
# spring-beans/spring-beans.gradle
# spring-context/spring-context.gradle
# spring-orm/spring-orm.gradle
# spring-test/spring-test.gradle
# spring-web/spring-web.gradle
# spring-webflux/spring-webflux.gradle
2023-08-02 01:04:31 +02:00
Juergen Hoeller
b9ae996dfc
Merge branch '6.0.x'
...
# Conflicts:
# spring-context/spring-context.gradle
# spring-context/src/main/java/org/springframework/context/event/SimpleApplicationEventMulticaster.java
# spring-context/src/test/java/org/springframework/scheduling/annotation/EnableSchedulingTests.java
# spring-orm/src/main/java/org/springframework/orm/hibernate5/SpringBeanContainer.java
# spring-test/spring-test.gradle
# spring-webmvc/spring-webmvc.gradle
2023-08-02 00:16:55 +02:00
Juergen Hoeller
450cc212a2
Support for transactional listeners with reactive transactions
...
TransactionalApplicationListener and TransactionalEventListener automatically detect a reactive TransactionContext as the event source and register the synchronization accordingly. TransactionalEventPublisher is a convenient delegate for publishing corresponding events with the current TransactionContext as event source. This can also serve as a guideline for similar reactive event purposes.
Closes gh-27515
Closes gh-21025
Closes gh-30244
2023-08-01 23:27:38 +02:00
Sam Brannen
2dc4eea62f
Remove native image hints for TransactionDefinition constants
...
Closes gh-30854
2023-08-01 14:46:07 +03:00
Sam Brannen
bcff7d74cd
Replace map entry traversal with switch expression
...
See gh-30851
2023-07-31 16:23:47 +03:00
Sam Brannen
0eda44186a
Polish tests for configuration constants
...
See gh-30851
2023-07-31 16:08:47 +03:00
Juergen Hoeller
b9ba0fc572
Polishing
2023-07-24 11:26:48 +02:00
Juergen Hoeller
fdf1418dfb
Polishing
2023-07-24 11:21:13 +02:00
Sam Brannen
97810c84a2
Stop using Constants utility in AbstractPlatformTransactionManager
...
See gh-30851
2023-07-19 17:29:36 +03:00
Sam Brannen
d0076f5c14
Stop using Constants utility in DefaultTransactionDefinition
...
See gh-30851
2023-07-19 16:35:15 +03:00
Sam Brannen
c110644107
Polish TransactionSupportTests
2023-07-19 14:33:40 +03:00
Juergen Hoeller
25ea1f4c0f
Merge branch '6.0.x'
...
# Conflicts:
# spring-context/src/main/java/org/springframework/scheduling/support/CronSequenceGenerator.java
2023-07-19 00:37:06 +02:00
Juergen Hoeller
2f33e77ab4
Consistent equals/hashCode style (and related polishing)
2023-07-19 00:35:19 +02:00
Sam Brannen
635cd29599
Remove cross reference to Constants utility
...
See gh-30851
2023-07-16 13:50:26 +02:00
Sam Brannen
63fe45d92a
Update copyright headers
2023-07-15 13:11:29 +02:00
Sam Brannen
e6d360c1c6
Polishing
2023-07-15 12:58:18 +02:00
Juergen Hoeller
0ab94478fe
Add since tags and code style refinements
...
See gh-27735
2023-07-14 11:48:37 +02:00
René Wittner
4b80b0f490
DataAccessUtils result accessors with Optional return value ( #27735 )
2023-07-14 11:37:09 +02:00
Juergen Hoeller
4152034799
Move transaction configuration check to transaction.annotation package
...
AbstractTransactionManagementConfiguration.transactionalEventListenerFactory() creating a RestrictedTransactionalEventListenerFactory now.
See gh-30679
2023-07-12 19:09:48 +02:00
Juergen Hoeller
79df1da792
Clarify ReactiveTransactionManager exception declarations
...
Avoid misleading "throws TransactionException" declarations but preserve javadoc "@throws" notes for specific exceptions (with reactive propagation semantics).
Closes gh-30817
2023-07-05 12:51:45 +02:00
Juergen Hoeller
c5771bc7c8
Discuss JdbcTransactionManager vs DataSourceTransactionManager
...
Includes doc update for 6.0 default exception translation etc.
Closes gh-30802
2023-07-05 12:51:10 +02:00
Juergen Hoeller
f1567fb21a
Raise beforeCompletion/afterCompletion exception log level to error
...
Closes gh-30776
2023-06-30 12:47:30 +02:00
Sam Brannen
39bc7566df
Stop printing to System.out in tests
2023-06-24 14:10:12 +02:00
Sébastien Deleuze
d3a249e34d
Reduce the delay used for Coroutines in tests
...
Closes gh-30731
2023-06-23 14:17:56 +02:00
Juergen Hoeller
1218e65ca1
Merge branch '6.0.x'
2023-07-05 12:53:07 +02:00
Juergen Hoeller
83ec9f4fe7
Merge branch '6.0.x'
...
# Conflicts:
# build.gradle
2023-06-30 13:00:04 +02:00
Seonghoon Kim
3f65b8506b
Increase log level to error
2023-06-30 12:38:28 +02:00
Sam Brannen
9ccbeec947
Ignore null message when introspecting resource cleanup failure
...
This commit fixes a regression introduced in conjunction with gh-27572.
See gh-30597
Closes gh-30729
2023-06-23 12:01:16 +02:00
Sam Brannen
19686adc01
Merge branch '6.0.x'
2023-06-24 14:15:05 +02:00
Sébastien Deleuze
35667e81ea
Merge branch '6.0.x'
2023-06-23 14:20:13 +02:00
Juergen Hoeller
d881cd3346
Accept REQUIRES_NEW on non-async transactional event listeners
...
See gh-30679
2023-06-23 14:03:11 +02:00
Sam Brannen
171535f680
Merge branch '6.0.x'
2023-06-23 12:07:37 +02:00
Sam Brannen
b8a713fde3
Merge branch '6.0.x'
2023-06-22 15:12:25 +02:00
Johnny Lim
271f2dc665
Polish
...
This commit polishes a bit.
Closes gh-30691
2023-06-22 15:06:05 +02:00
Juergen Hoeller
18c6aceee7
Consistent guard for Reactive Streams presence
...
Closes gh-30707
2023-06-20 22:51:23 +02:00
Juergen Hoeller
842569c9e5
Detect invalid transaction configuration for transactional event listeners
...
Closes gh-30679
2023-06-17 16:13:59 +02:00
Sam Brannen
526d9eae7f
Merge branch '6.0.x'
2023-06-15 16:20:19 +02:00
Sam Brannen
4565bcd757
Update copyright headers
2023-06-15 16:19:58 +02:00
Juergen Hoeller
ef2b47e202
Merge branch '6.0.x'
2023-06-08 17:46:19 +02:00
Juergen Hoeller
c16f582ed8
Consistent equals implementations in AOP support classes
2023-06-08 17:42:49 +02:00
Juergen Hoeller
6931106c5e
Redesign inner Pointcut implementations as standalone classes
...
Avoids exposure of implicit Advisor instance state in Pointcut instance.
See gh-30621
2023-06-08 17:42:49 +02:00
Juergen Hoeller
1b62b6dd89
Merge branch '6.0.x'
2023-06-07 17:23:09 +02:00
Juergen Hoeller
c052a02592
Ignore null message when introspecting resource cleanup failure
...
Closes gh-30597
2023-06-07 17:21:41 +02:00
Sam Brannen
02f152c6e1
Merge branch '6.0.x'
2023-05-23 15:11:19 +02:00
Sam Brannen
4bb12c4ba4
Update copyright headers
2023-05-23 15:10:08 +02:00
Sébastien Deleuze
f956d399ae
Upgrade to Kotlin Coroutines 1.7
...
Leverages Kotlin/kotlinx.coroutines#3487 .
Closes gh-30514
2023-05-22 18:07:21 +02:00
Simon Baslé
f5bc084ce2
Merge branch '6.0.x' (javadoc changes)
2023-05-16 15:05:42 +02:00
Simon Baslé
eabb846d07
Improve how the build deals with javadoc invalid references
...
This commit improves how the build deals with javadoc invalid references
in two ways.
Link/see references that are temporarily invalid during javadoc
generation of individual modules are better masked by using the option
`Xdoclint:syntax` instead of `Xdoclint:none` (warnings were still
visible in some cases, e.g. when individually building the javadoc for
a specific module).
Global javadoc-building task `api` now combines `syntax` and `reference`
`Xdoclint` groups, allowing to raise truly invalid references even when
all the modules have been aggregated.
This commit also fixes the 20+ errors which appeared following the later
change in doclet configuration.
Closes gh-30428
2023-05-16 15:04:10 +02:00
Juergen Hoeller
dd871e0d8c
Trigger rollback for (Completable)Future exception on method return
...
Closes gh-30018
2023-05-03 10:03:31 +02:00
Krzysztof Krasoń
1734deca1e
Refactor AssertJ assertions into more idiomatic ones
...
This commit refactors some AssertJ assertions into more idiomatic and
readable ones. Using the dedicated assertion instead of a generic one
will produce more meaningful error messages.
For instance, consider collection size:
```
// expected: 5 but was: 2
assertThat(collection.size()).equals(5);
// Expected size: 5 but was: 2 in: [1, 2]
assertThat(collection).hasSize(5);
```
Closes gh-30104
2023-04-04 17:34:07 +02:00
Sam Brannen
9cf7b0e230
Polishing
2023-03-12 18:38:50 +01:00
Simon Baslé
9b50c0d590
Ensure reactive transaction rollback on commit error
...
This change fixes a situation where error handling was skipped during
`processCommit()` in case the `doCommit()` failed. The error handling
was set up via an `onErrorResume` operator that was nested inside a
`then(...)`, applied to an inner `Mono.empty()`. As a consequence,
it would never receive an error signal (effectively decoupling the
onErrorResume from the main chain).
This change simply moves the error handling back one level up. It also
simplifies the `doCommit` code a bit by getting rid of the steps that
artificially introduce a `Mono<Object>` return type, which is not really
needed.
A pre-existing test was missing the fact that the rollback didn't occur,
which is now fixed. Another dedicated test is introduced building upon
the `ReactiveTestTransactionManager` class.
Closes gh-30096
2023-03-10 12:23:44 +01:00
Sam Brannen
74f6725a37
Update copyright headers
2023-03-06 13:56:33 +01:00
Enric Sala
edf0ae77e5
Avoid rollback after a commit failure in TransactionalOperator
...
A failure to commit a reactive transaction will complete the
transaction and clean up resources. Executing a rollback at
that point is invalid, which causes an
IllegalTransactionStateException that masks the cause of the
commit failure.
This change restructures TransactionalOperatorImpl and
ReactiveTransactionSupport to avoid executing a rollback after
a failed commit. While there, the Mono transaction handling in
TransactionalOperator is simplified by moving it to a default
method on the interface.
Closes gh-27572
2023-03-06 10:05:59 +01:00
Sam Brannen
8c784085d2
Update copyright dates
2023-03-02 16:22:53 +01:00
Sam Brannen
b1cf832c28
Apply "instanceof pattern matching" in spring-tx
...
This commit applies "instanceof pattern matching" to the rest of the
code in spring-tx.
See gh-30019
2023-02-28 16:03:37 +01:00
Sam Brannen
34e5ce9360
Fix Checkstyle violations
...
See gh-30019
2023-02-28 16:03:37 +01:00
diguage
375114defa
Apply "instanceof pattern matching" in spring-tx
...
Closes gh-30019
2023-02-28 15:33:59 +01:00
Sam Brannen
6d24e62e83
Polishing
2023-02-19 17:43:31 +01:00
Johnny Lim
6739ca82ce
Polishing
...
See gh-23846
See gh-29955
Closes gh-29992
2023-02-19 13:41:36 +01:00
Sébastien Deleuze
026be04b75
Polish CoroutinesAnnotationTransactionInterceptorTests
2023-02-13 15:34:01 +01:00
Sébastien Deleuze
45ae00fda3
Propagate the context in Coroutines transactions
...
This commit ensures that CoroutineContext is properly
propagated in transactional suspending functions. Both
annotation and functional variants are supported.
Closes gh-27308
2023-02-13 15:34:01 +01:00
Sébastien Deleuze
e170c16b02
Refine TransactionalOperator.executeAndAwait nullability
...
Before this commit, TransactionalOperator.executeAndAwait had a rigid
null-safety handling. This commit takes advantage of Kotlin capability
to allow to deal with both non-null and nullable depending on the
nullability of the lambda.
Closes gh-29919
2023-02-02 14:39:33 +01:00
Juergen Hoeller
4d6249811e
Explicit target ClassLoader for interface-based infrastructure proxies
...
Includes direct JDK Proxy usage instead of ProxyFactory where possible.
Closes gh-29913
2023-01-31 16:11:34 +01:00
Sam Brannen
0502d18e3d
Update copyright headers
2023-01-19 16:20:03 +01:00
Sam Brannen
c4c786596f
Migrate to Mockito.mock(T...) where feasible
2023-01-19 16:20:02 +01:00
Sam Brannen
a4956dfe26
Update copyright headers
2023-01-11 13:52:20 +01:00
Sam Brannen
0415975dd1
Polish contribution and related code
2023-01-11 13:52:20 +01:00
Krzysztof Krason
afb8a0d1b1
Use new Java features (switch expressions, text blocks, new JDK methods)
...
Closes gh-29747
2023-01-11 13:51:28 +01:00
Sam Brannen
e5cfbae3fd
Polishing
2022-12-16 13:48:45 +01:00
Sam Brannen
618989d317
Update copyright date
2022-12-13 13:44:18 +01:00
Juergen Hoeller
4c69892f39
Detect SQL state 23505/40001 as DuplicateKeyException/CannotAcquireLockException
...
Favors PessimisticLockingFailureException over plain ConcurrencyFailureException.
Deprecates CannotSerializeTransactionException and DeadlockLoserDataAccessException.
Closes gh-29511
Closes gh-29675
2022-12-13 11:07:13 +01:00
Sam Brannen
ad60164911
Update copyright headers for source code changed since August 2022
...
The changes in this commit were performed using the newly introduced
update_copyright_headers.sh script.
2022-11-29 19:38:42 +01:00
Sam Brannen
36f7597f25
Use AssertJ's hasSize() for collections and maps
...
Achieved via a global search-and-replace.
2022-11-22 16:50:10 +01:00
Sam Brannen
508d2c7a77
Fix Javadoc formatting issues for headings
...
Headings in method-level Javadoc must be h4 or higher in recent versions
of Java.
2022-11-16 14:09:42 +01:00
Sam Brannen
f26a7dee97
Fix broken tests, update copyright dates, and polish
...
See gh-29414
2022-11-08 20:07:53 +01:00
Kulwant Singh
b2c8546013
Rely on automatic boxing/unboxing in tests
...
Closes gh-29414
2022-11-08 19:38:03 +01:00
Sam Brannen
e1010a179f
Merge branch '5.3.x'
...
# Conflicts:
# spring-context/src/test/java/org/springframework/context/annotation/Gh29105Tests.java
2022-11-08 12:27:40 +01:00
Sam Brannen
e5878ab15b
Fix precondition assertions
2022-11-08 12:08:08 +01:00
Sam Brannen
ae368a20b8
Merge branch '5.3.x'
...
# Conflicts:
# spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonDecoderTests.kt
# spring-web/src/test/kotlin/org/springframework/http/codec/json/KotlinSerializationJsonEncoderTests.kt
2022-10-08 14:06:41 +02:00
Johnny Lim
1c1a0afbed
Use AssertJ static imports consistently in 5.3.x
...
Closes gh-29282
2022-10-08 13:57:21 +02:00
Sam Brannen
321092ce6f
Consistent use of @Deprecated(since = "6.0")
2022-09-20 14:34:24 +02:00
Sam Brannen
8d92c57777
Merge branch '5.3.x'
...
# Conflicts:
# spring-tx/src/main/java/org/springframework/jca/cci/core/support/CciDaoSupport.java
2022-09-14 16:52:55 +02:00
Sam Brannen
62a0ab3667
Polish contribution
2022-09-14 16:50:32 +02:00
Marc Wrobel
92a231cf91
Fix typos in Javadoc, reference docs, and code
...
Closes gh-28822
2022-09-14 16:45:34 +02:00
Sébastien Deleuze
9cfe79186d
Stop using RuntimeHintsUtils
...
Due to gh-29053, we can stop using RuntimeHintsUtils to
register SynthesizedAnnotation proxies.
Closes gh-29059
2022-09-07 10:10:07 +02:00
Sébastien Deleuze
b8c1fc9202
Revert "Remove RuntimeHintsUtils"
...
This reverts commit 3e327f5641
.
2022-09-06 18:21:34 +02:00
Sébastien Deleuze
3e327f5641
Remove RuntimeHintsUtils
...
Due to gh-29053, we can stop using RuntimeHintsUtils to
register SynthesizedAnnotation proxies.
Closes gh-29058
Closes gh-29059
2022-09-06 15:31:02 +02:00
Stephane Nicoll
58b0251af1
Relocate TestGenerationContext to spring-core-test
...
This commit moves the test implementation for GenerationContext in
spring-core-test. This also removes the copy we had in testfixtures
See gh-28877
2022-09-05 16:21:17 +02:00
Sam Brannen
69f23095b8
Deprecate SynthesizedAnnotation and related methods
...
Since Spring no longer adds the SynthesizedAnnotation interface to the
JDK dynamic proxy used to synthesize an annotation, this commit
officially deprecates SynthesizedAnnotation and related methods in
RuntimeHintsUtils.
See gh-29041, gh-29054
Closes gh-29053
2022-09-02 12:04:17 +02:00