Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sdeleuze/demo-coroutines-tx
https://github.com/sdeleuze/demo-coroutines-tx
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sdeleuze/demo-coroutines-tx
- Owner: sdeleuze
- Created: 2020-11-08T16:18:33.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-08T16:29:37.000Z (about 4 years ago)
- Last Synced: 2024-10-11T16:11:28.488Z (3 months ago)
- Language: Kotlin
- Size: 58.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Demo project for Spring Coroutines `@Transactional` support.
Current issue: [#25998](https://github.com/spring-projects/spring-framework/issues/25998) @Transactional on suspending function returning a value always rollbacks. To reproduce:
Reactive returning no value works as expected.
```
http POST http://localhost:8080/reactive/create-twoInitializing transaction synchronization
Getting transaction for [com.example.FooReactiveService.createMessages]
Completing transaction for [com.example.FooReactiveService.createMessages]
Clearing transaction synchronization
```Reactive returning a value works as expected.
```
http POST http://localhost:8080/reactive/create-oneInitializing transaction synchronization
Getting transaction for [com.example.FooReactiveService.createMessage]
Completing transaction for [com.example.FooReactiveService.createMessage]
Clearing transaction synchronization
```Coroutines returning no value works as expected.
```
http POST http://localhost:8080/coroutines/create-twoInitializing transaction synchronization
Getting transaction for [com.example.FooCoroutinesService.createMessages]
Completing transaction for [com.example.FooCoroutinesService.createMessages]
Clearing transaction synchronization
```Coroutines returning a value does not work as expected (always rollbacks).
```
http POST http://localhost:8080/coroutines/create-oneInitializing transaction synchronization
Getting transaction for [com.example.FooCoroutinesService.createMessage]
Rolling back transaction for [com.example.FooCoroutinesService.createMessage] after cancellation
Clearing transaction synchronization
```