Commit Graph

414 Commits

Author SHA1 Message Date
Rossen Stoyanchev
150fe96a98 Merge branch '5.2.x' 2020-06-08 17:44:42 +01:00
Rossen Stoyanchev
9e1121fd8d Document behavior on reactive tx cancellation
Closes gh-25091
2020-06-08 17:43:52 +01:00
Juergen Hoeller
e955e52f2f Refactor method name dispatching to switch statements
Closes gh-25163
2020-05-29 23:07:25 +02:00
Juergen Hoeller
42ff01b5aa Merge branch '5.2.x' 2020-05-29 15:57:32 +02:00
Juergen Hoeller
cd4ef6f781 Consistently refer to FlushMode.MANUAL instead of outdated NEVER
Closes gh-25158
2020-05-29 15:51:54 +02:00
Juergen Hoeller
929244215c Merge branch '5.2.x'
# Conflicts:
#	build.gradle
2020-05-26 23:37:53 +02:00
Juergen Hoeller
1dea55dc20 WebSphereUowTransactionManager sets timeout for actual transaction only
Closes gh-25132
2020-05-26 23:34:36 +02:00
Juergen Hoeller
3c1ee64b7f Explicit nullability declarations for all AOP Alliance methods
Includes consistent declarations in AOP Alliance related Spring AOP code.

Closes gh-24117
2020-05-13 23:33:47 +02:00
Sam Brannen
a16d178d72 Polish Javadoc for NameMatchTransactionAttributeSource 2020-05-13 13:29:07 +02:00
Juergen Hoeller
dd0d0d51f6 Introduce resolvable timeout attribute on @Transactional and <tx:method>
Placeholders get resolved in timeoutString, qualifier and labels now.

Closes gh-25052
2020-05-12 21:55:22 +02:00
Sam Brannen
715e8c9ef6 Align TransactionManagementConfigurer support in TCF with production
This commit picks up where 613bd3be1d
left off by ensuring that a transaction manager configured via the
TransactionManagementConfigurer API takes precedence over any
transaction manager configured as a bean in the ApplicationContext
unless @Transactional is configured with a qualifier for the explicit
transaction manager to use in tests.

Closes gh-24869
2020-05-11 13:59:34 +02:00
Sam Brannen
65acda8d3e Polishing 2020-05-11 12:26:13 +02:00
Sam Brannen
3f30dcae80 Merge branch '5.2.x' 2020-05-10 15:44:57 +02:00
Yanming Zhou
50a4fdac6e Use Map::computeIfAbsent to simplify scope implementations
Closes gh-25038
2020-05-10 15:41:00 +02:00
Sam Brannen
2dc9020f80 Merge branch '5.2.x' 2020-05-09 13:57:41 +02:00
Sam Brannen
f5d011cb82 Filter reactive tx managers in TransactionAttributeSourceClassFilter
Prior to this commit, the TransactionAttributeSourceClassFilter
filtered out PlatformTransactionManager but not
ReactiveTransactionManager implementations.

TransactionAttributeSourceClassFilter now filters out any
TransactionManager implementation, covering both imperative and
reactive transaction managers.
2020-05-09 13:57:03 +02:00
Sam Brannen
29fe8cecbb Merge branch '5.2.x' 2020-05-08 19:49:56 +02:00
Sam Brannen
ec3d647d1d Update spring-tx.xsd regarding reactive tx mgmt support
Closes gh-25030
2020-05-08 19:49:00 +02:00
Sam Brannen
8f7debc769 Merge branch '5.2.x' 2020-05-08 19:26:00 +02:00
Sam Brannen
0f22a5e409 Update Javadoc regarding reactive tx mgmt support
See gh-25030
2020-05-08 19:25:22 +02:00
Mark Paluch
2aa8aef216 Extend transaction attributes with labels
TransactionAttribute now exposes a labels attribute that associates a
descriptive array of labels with a transaction.

Labels may be of a pure descriptive nature or may get evaluated by
transaction managers to associate technology-specific behavior
with the actual transaction.
2020-05-06 16:28:21 +02:00
Sam Brannen
1d0c5195bc Polish Javadoc for TransactionManagementConfigurer 2020-04-06 15:31:48 +02:00
Sam Brannen
144b0e1437 Test status quo for @Primary + TransactionManagementConfigurer
This commit introduces tests for the status quo in production support
for multiple transaction managers registered as @Primary and via the
TransactionManagementConfigurer API.

See gh-24869
2020-04-06 15:16:31 +02:00
Sam Brannen
f8ab19dc68 Ensure @EnableTxMgmt tests actually test something 2020-04-06 14:32:34 +02:00
Sam Brannen
e26764d249 Remove duplicate words in documentation and polish Javadoc 2020-03-31 12:17:58 +02:00
Qimiao Chen
70581d1ea2 Improve javadoc in RollbackRuleAttribute regarding nested classes
Closes gh-24682

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2020-03-15 12:06:16 +01:00
Juergen Hoeller
193f419520 Deprecate PTM-based constructors in favor of generic TransactionManager
Closes gh-24612
2020-03-11 14:52:03 +01:00
Rossen Stoyanchev
adc13f2030 Polishing contribution
See gh-24493
2020-02-20 17:58:47 +00:00
陈其苗
a09f02f64e Minor refactoring in AbstractPlatformTransactionManager
See gh-24493
2020-02-20 17:33:18 +00:00
Juergen Hoeller
d1c7083e77 Consistent ROLE_INFRASTRUCTURE declarations for configuration classes
Closes gh-24509
2020-02-12 16:49:02 +01:00
Michael Simons
711fafc924 Improve assertion message in PersistenceExceptionTranslationInterceptor
Closes gh-24484
2020-02-06 15:41:33 +01:00
Sam Brannen
5581f3b77b Use Gradle test fixture support for spring-tx
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
726b1bb1d0 Rename test fixture package in spring-context
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
7cd4ddf5fc Rename test fixture package in spring-beans
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen
4260c34b47 Rename test fixture package in spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen
61d4ee594d Use Gradle test fixture support for spring-beans and spring-context
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen
5718bf424b Use Gradle test fixture support for spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Juergen Hoeller
a4f75e9c6a Polishing 2019-12-09 13:29:00 +01:00
Sam Brannen
9f00eb68e9 Clean up warnings 2019-10-30 19:14:58 +01:00
Christoph Dreis
3c17178b16 Fix Mockito deprecations 2019-10-30 18:30:05 +01:00
Juergen Hoeller
43a86565ca Consider target transaction manager for reactive transaction decision
Closes gh-23832
2019-10-30 16:23:37 +01:00
Mark Paluch
0d8aa854e8 Add tests for cancellation of transactional streams
See gh-23864

Closes gh-23873
2019-10-25 17:16:33 +02:00
Andreas Killaitis
f838590300 Commit on cancelled subscription in TransactionalOperator::transactional
Prior to this commit, TransactionalOperator::transactional did not close
the transaction when cancelled.

Closes gh-23864
2019-10-25 14:48:46 +02:00
Sebastien Deleuze
b24ac74106 Restore TransactionOperations Kotlin API compatibilty
This commit renames the Runnable variant to executeWithoutResult
and uses a Consumer<TransactionStatus> parameter for better
consistency with TransactionCallbackWithoutResult.

Closes gh-23724
2019-09-29 19:31:12 +02:00
Juergen Hoeller
2861fc65bd Polishing 2019-09-27 10:17:56 +02:00
Sebastien Deleuze
091c512f0d Upgrade to Coroutines 1.3.2
Closes gh-23663
2019-09-25 21:51:04 +02:00
Juergen Hoeller
a48c13ae73 Avoid deprecated usingWhen method in Reactor 3.3
Closes gh-23562
2019-09-20 21:54:18 +02:00
Mark Paluch
393a81d4a9 Omit cancellation of transactional Monos in TransactionOperator
TransactionOperator.as(Mono) now no longer short-cuts via a Flux.next() but provides an implementation via Mono.usingWhen(…).
The short-cut previously issued a cancellation signal to the transactional Mono causing the transaction cleanup to happen without a handle for synchronization.

Using Mono.usingWhen(…) initiates transaction cleanup when the Mono completes eliminating the need for cancellation of the transactional Publisher.

This change does not fully fix gh-23304 but it softens its impact because TransactionalOperator.transactional(Mono) avoids cancellation.
2019-09-20 20:48:39 +02:00
Sebastien Deleuze
fc6480631e Improve Coroutines transaction API
As a follow-up of gh-22915, the purpose of this commit is to improve
Coroutines programmatic transaction API to make it more consistent with
the Java one and more idiomatic.

For suspending functions, this commit changes the
TransactionalOperator.transactional extension with a suspending lambda
parameter to a TransactionalOperator.executeAndAwait one which is
conceptually closer to TransactionalOperator.execute Java API so more
consistent.

For Flow, the TransactionalOperator.transactional extension is correct
but would be more idiomatic as a Flow extension.

This commit also adds code samples to the reference documentation.

Closes gh-23627
2019-09-12 14:45:03 +02:00
康智冬
0d742cf3d0 Fix typos related to indefinite articles for SQL acronym
Closes gh-23603
2019-09-07 16:04:47 +02:00