Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlesl/aws-advanced-jdbc-wrapper-spring-transaction-example
https://github.com/dlesl/aws-advanced-jdbc-wrapper-spring-transaction-example
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dlesl/aws-advanced-jdbc-wrapper-spring-transaction-example
- Owner: dlesl
- Created: 2023-09-08T22:23:59.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-09-08T22:24:10.000Z (over 1 year ago)
- Last Synced: 2024-10-19T00:57:34.179Z (2 months ago)
- Language: Java
- Size: 63.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Example for https://github.com/awslabs/aws-advanced-jdbc-wrapper/issues/608
Without `DataSourceTransactionManagerConfig`, it is not possible to detect a
failover when the commit throws an `FailoverSQLException`. This is because the
Spring `TransactionManager` attempts to rollback in response to this exception.
The rollback fails, since it is a new connection with no active transaction, and
the rollback exception replaces the original `FailoverSQLException`.`DataSourceTransactionManagerConfig` is workaround which overrides
`translateException` to convert a `FailoverSQLException` to a subclass of
`TransactionException`. When this exception is thrown, the Spring
`TransactionManager` does not attempt to rollback.