linghengqian commented on issue #37283:
URL: 
https://github.com/apache/shardingsphere/issues/37283#issuecomment-3641610755

   > @linghengqian 
   
   - Um, to be honest, I don't see what this has to do with me. 
   - The existing documentation is based on my existing unit tests and a rather 
unusual set of external integration tests. Some of those external integration 
unit tests are from my Yuque article, while the other part was written by 
another Seata committer in the integration tests for `baomidou/mybatis-plus`. 
Since issue https://github.com/apache/incubator-seata/issues/6614 remains 
unresolved, moving those integration tests into the ShardingSphere master 
branch would be extremely complex. In short, you can make a presupposition that 
the document has room for improvement.
   
   > Based on our business scenario, global transactions are only needed for 
cross-service calls, while simple operations within a single service should use 
local transactions. 
   
   - I tend to adopt the viewpoint proposed by the Seata committer: for Seata, 
a single data source either contains only distributed transactions or only 
non-distributed transactions. ShardingSphere's existing Seata integration tests 
are created from this perspective. In other words, this can be broken down into 
a single database instance and multiple database connections, also known as a 
multi-data source problem. Since you're using the 
`@org.springframework.transaction.annotation.Transactional` under Spring 
Framework, why not try configuring Spring beans with multiple ShardingSphere 
data sources? I recall discussing this in a previous issue; see 
https://github.com/apache/shardingsphere/issues/35892#issuecomment-3037940418 .
   - Regarding whether ShardingSphere JDBC has an annotation similar to the 
`com.baomidou.dynamic.datasource.annotation.DS` class from the `baomidou` 
community for switching the data source used to create transactions, I would 
say there isn't one yet. After all, even Seata doesn't provide this 
functionality, so how could ShardingSphere bypass the operation of creating 
multiple data source connections simultaneously to handle this issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to