Transaction is already completed - do not call commit or rollback more than once per transaction
org.springframework.transaction.IllegalTransactionStateException: Transaction is already completed - do not call commit or rollback more than once per transaction
Yes, you said that is not wise, and I also know it, but I really was thinking that I removed that code.
My bad. I will be checking twice next time. I am sorry.
When trying to use transactional operator:
The following error appears:
Full Error Log
Originally, error appeared in eventuate-tram-core test:
Reason is that eventuate-common declares TransactionAwareConnectionFactoryProxy and creates DatabaseClient using it:
https://github.com/eventuate-foundation/eventuate-common/blob/6189c65a26121096d11fb20df01fd99868fdbe7f/eventuate-common-spring-reactive-jdbc/src/main/java/io/eventuate/common/spring/jdbc/reactive/EventuateCommonReactiveDatabaseConfiguration.java#L29-L33
TransactionAwareConnectionFactoryProxy already wraps queries in transactions.
To have control over transactions is necessary to remove TransactionAwareConnectionFactoryProxy from the chain.
Problem was not handled by eventuate common tests because they hide exceptions here:
https://github.com/eventuate-foundation/eventuate-common/blob/6189c65a26121096d11fb20df01fd99868fdbe7f/eventuate-common-spring-reactive-jdbc/src/test/java/io/eventuate/common/spring/jdbc/reactive/EventuateCommonReactiveJdbcOperationsTest.java#L74-L84
Yes, you said that is not wise, and I also know it, but I really was thinking that I removed that code. My bad. I will be checking twice next time. I am sorry.