Hi, I’m the one who recently created
this PR.
I’m trying to improve SpringTransactionManager a bit more, and I’m wondering what the Exposed maintainers think.
- The current implementation of DataSourceTransactionManager is a JDBC implementation, and it’s hard to create Exposed-specific functionality using it. To solve this, I think I should create a SpringTransactionManager that implements PlatformTransactionManager, an interface that Spring created to manage transactions, but I’m wondering why you used DataSourceTransactionManager, which is a JDBC implementation.
- If I register the SpringTransactionManager bean in a Spring container, I need to prevent the existing transaction { } and newSuspendTransaction { } from being used. (They throw exceptions, etc.) I think they don’t match the lifecycle of transactions provided by Spring and cause undocumented issues (such as returning the wrong manager in TransactionManager.current()).
If Exposed is going to continue to support Spring, it would be great if you could answer these questions so I can make improvements.